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: Sat, 16 Feb 2013 18:06:05 +0100 From: Oleg Nesterov <oleg@...hat.com> To: Mandeep Singh Baines <msb@...omium.org> Cc: linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, "Rafael J. Wysocki" <rjw@...k.pl>, Ingo Molnar <mingo@...hat.com> Subject: Re: [PATCH 2/5] lockdep: check that no locks held at freeze time Well, this is almost cosmetics, and I am not maintaner, but... On 02/16, Mandeep Singh Baines wrote: > > static inline bool try_to_freeze(void) > { > + if (current->flags & PF_NOFREEZE) > + return false; > + debug_check_no_locks_held(current, "lock held while trying to freeze"); I think this should be if (!(current->flags & PF_NOFREEZE)) debug_check_no_locks_held(...); without "return". This way we avoid the unnecessary PF_NOFREEZE check if !CONFIG_LOCKDEP. And perhaps more importantly, this way it is clear that we check PF_NOFREEZE for debugging only and do not change the code behaviour. But I leave this to Rafael/Tejun. And again, unless I missed something, this makes 1/5 unnecessary. 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