Messages in this thread | | | Date | Tue, 30 Apr 2013 19:15:01 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 02/10] freezer: skip waking up tasks with PF_FREEZER_SKIP set |
| |
On 04/30, Oleg Nesterov wrote: > > On 04/29, Colin Cross wrote: > > > > @@ -46,10 +46,10 @@ static int try_to_freeze_tasks(bool user_only) > > todo = 0; > > read_lock(&tasklist_lock); > > do_each_thread(g, p) { > > - if (p == current || !freeze_task(p)) > > + if (p == current || freezer_should_skip(p)) > > continue; > > > > - if (!freezer_should_skip(p)) > > + if (freeze_task(p)) > > todo++; > > What if we race with freezer_count() ? > > try_to_freeze_tasks() can wrongly succeed leaving the running task > unfrozen, no?
Ah, no, sorry for noise.
Oleg.
| |