Re: [PATCH 09/16] freezer: make freezing indicate freeze conditionin effect

From: Tejun Heo
Date: Mon Aug 29 2011 - 03:31:42 EST


On Sun, Aug 28, 2011 at 07:56:01PM +0200, Oleg Nesterov wrote:
> > + /* leave FROZEN */
> > + spin_lock_irq(&freezer_lock);
> > + current->flags &= ~PF_FROZEN;
> > + spin_unlock_irq(&freezer_lock);
>
> What if freezing() is true again when we are going to clear
> PF_FROZEN?
>
> In this case the 2nd try_to_freeze_tasks() can see this task
> as already frozen and return success while it is going to run.

Indeed, if we need to do if (frezing) goto retry; there. Will fix.

Thanks.

--
tejun
--
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/