kernel-ark/fs/pstore
Maxime Bizon b042e47491 pstore/ram: Fix undefined usage of rounddown_pow_of_two(0)
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: stable@vger.kernel.org
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-11-17 17:40:57 -08:00
..
ftrace.c pstore/ftrace: Convert to its own enable/disable debugfs knob 2012-09-06 22:16:58 -07:00
inode.c pstore: Add persistent function tracing 2012-07-17 10:05:52 -07:00
internal.h pstore/ftrace: Convert to its own enable/disable debugfs knob 2012-09-06 22:16:58 -07:00
Kconfig pstore/ftrace: Convert to its own enable/disable debugfs knob 2012-09-06 22:16:58 -07:00
Makefile pstore: Add persistent function tracing 2012-07-17 10:05:52 -07:00
platform.c pstore: Fix NULL pointer dereference in console writes 2012-11-14 18:30:21 -08:00
ram_core.c pstore/ram: Make tracing log versioned 2012-07-17 16:48:09 -07:00
ram.c pstore/ram: Fix undefined usage of rounddown_pow_of_two(0) 2012-11-17 17:40:57 -08:00