Re: pipe_release oops.

From: JÃrn Engel
Date: Tue Mar 12 2013 - 16:34:28 EST


On Sun, 10 March 2013 23:33:18 +0000, Al Viro wrote:
> On Fri, Mar 08, 2013 at 01:26:49PM -0500, J??rn Engel wrote:
>
> > + files_cookie = async_schedule(exit_files_async, tsk);
> > exit_mm(tsk);
> >
> > if (group_dead)
> > @@ -990,7 +998,7 @@ void do_exit(long code)
> >
> > exit_sem(tsk);
> > exit_shm(tsk);
> > - exit_files(tsk);
> > + async_synchronize_cookie(files_cookie);
>
> That doesn't do what you seem to think it's doing. It does *not* wait
> for the completion of that sucker's execution - only the ones scheduled
> before it. IOW, your exit_files_async() might very well be executed
> *after* do_exit() completes and tsk gets reused.

Indeed. Maybe async_barrier() would have been a less dangerous name
in the presence of people like me. Oh well!

I have kernel/async.c on my list anyway. We've had a number of cases
where a single bad scsi device turned the "do the scanning
asynchronously" idea into a "make completely unrelated stuff
synchonously wait for a broken disk" reality.

Thanks for spotting this!

JÃrn

--
The cheapest, fastest and most reliable components of a computer
system are those that aren't there.
-- Gordon Bell, DEC labratories
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/