[PATCH] round log buffer size to power of two
If setting the printk log buffer (with the boot command line option "log_buf_len") to a value that's not a power of two, the index calculations go wrong and yield confusing results. This patch rounds the size to the next higher power of two. It'll yield garbage for sizes > INT_MAX bytes. Signed-off-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment