lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 20 Dec 2010 15:59:38 +0100 From: Oleg Nesterov <oleg@...hat.com> To: Tejun Heo <tj@...nel.org> Cc: roland@...hat.com, linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org, akpm@...ux-foundation.org, rjw@...k.pl, jan.kratochvil@...hat.com Subject: Re: [PATCH 03/16] signal: remove superflous try_to_freeze() loop in do_signal_stop() On 12/06, Tejun Heo wrote: > > do_signal_stop() is used only by get_signal_to_deliver() and after a > successful signal stop, it always calls try_to_freeze(), so the > try_to_freeze() loop around schedule() in do_signal_stop() is > superflous and confusing. Remove it. I think the patch is obvioulsy fine. Acked-by: Oleg Nesterov <oleg@...hat.com> But I am a bit confused, a couple of off-topic questions to Rafael. > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -1781,9 +1781,7 @@ static int do_signal_stop(int signr) > } > > /* Now we don't run again until woken by SIGCONT or SIGKILL */ > - do { > - schedule(); > - } while (try_to_freeze()); > + schedule(); I am wondering what was the purpose of this do/while loop. Probably this was just oversight. We always return in TASK_RUNNING state from schedule, try_to_freeze() should return the task in this state too. My question is: refrigerator() tries to preserve the caller's state. Why? I think it is just wrong to call refrigerator() unless the task is TASK_RUNNING, no? If no, then the games with saving/restoring ->state look obviously racy/wrong. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists