On 04/23, Rafael J. Wysocki wrote:
>
> On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote:
> > > + if (!freezer_should_exempt(current)) {
> > task_lock(k);
> > > + /* We are freezable, so we must make sure that the thread being
> > > + * stopped is not frozen and will not be frozen until it dies
> > > + */
> > > + freezer_exempt(k);
> > > + if (frozen(k))
> > > + clear_frozen_flag(k);
> > task_unlock(k);
> > > + }
>
> Yes, that's correct. We need to take task_lock() to avoid the race with
> refrigerator().
Even if we use thaw_task() ?
Even if I am wrong, I think we should not use task_lock() for the freezing
related code, except in freezer.[ch]
Note also that without CONFIG_FREEZER freezer_should_exempt() == 0, so we
will do unneeded task_lock/task_unlock.
Oleg.
-
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]