On Mon, Oct 22, 2012 at 08:17:27AM -0700, Kees Cook wrote: > On Mon, Oct 22, 2012 at 2:19 AM, Florian Fainelli <[email protected]> > wrote: > > From: Maxime Bizon <[email protected]> > > > > record_size / console_size / ftrace_size can be 0 (this is how you > > disable the feature), but rounddown_pow_of_two(0) is undefined. As suggested > > by Kees Cook, use !is_power_of_2() as a condition to call > > rounddown_pow_of_two > > and avoid its undefined behavior on the value 0. This issue has been present > > since commit 1894a253 (ramoops: Move to fs/pstore/ram.c). > > > > CC: [email protected] > > Signed-off-by: Maxime Bizon <[email protected]> > > Signed-off-by: Florian Fainelli <[email protected]> > > Thanks for the fix! > > Acked-by: Kees Cook <[email protected]>
Applied, thanks! -- 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/

