Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, 12 May 2007 12:52, Gautham R Shenoy wrote:
> On Sat, May 12, 2007 at 12:41:54PM +0200, Rafael J. Wysocki wrote:
> > 
> > Still, the following scenario is possible while we're freezing users space
> > tasks:
> > 
> > (1) user space task calls daemonize()
> > (2) freezer checks if this is a user space task and the test returns 'true'
> > (3) task calls exit_mm() and clears its TIF_FREEZE
> > (4) freezer sets TIF_FREEZE for the task
> > (5) task calls try_to_freeze() and freezes itself (bad!)
> > 
> > To prevent this from happening, I think, we should acquire task_lock() around
> > the entire block in which the test is made and TIF_FREEZE is set for the task,
> > so something more sophisticated than
> > freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch is needed.
> >
> 
> Hmmm, turns out Linus was right, after all! The caller needs to acquire
> the task_lock().
> 
> > Well, I think we should ask Andrew to drop this patch and try to address the
> > issue in the next series of patches.
> 
> I think it's a good idea. 
> 
> I would want to review the patches again. The more I look at them,
> the better I seem to understand the subtleties in the freezer code.

Okay, I'll put the entire series on the web later today and I'll let you know
when it's ready.

Andrew, could you please drop
freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch?

I believe that the other six freezer patches currently in -mm are correct.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux