]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pstore: Fix NULL pointer dereference in console writes
authorColin Ian King <colin.king@canonical.com>
Wed, 14 Nov 2012 11:49:53 +0000 (11:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 20:14:09 +0000 (12:14 -0800)
commitab37cb2a6cde96c269a9cfb14b4affbe5fe11675
tree5161187fda456e934c6687cbabcf96dc43899ca7
parente1813d49914ec3f7751b4981d5f46c94f111b670
pstore: Fix NULL pointer dereference in console writes

commit 70a6f46d7b0ec03653b9ab3f8063a9717a4a53ef upstream.

Passing a NULL id causes a NULL pointer deference in writers such as
erst_writer and efi_pstore_write because they expect to update this id.
Pass a dummy id instead.

This avoids a cascade of oopses caused when the initial
pstore_console_write passes a null which in turn causes writes to the
console causing further oopses in subsequent pstore_console_write calls.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/pstore/platform.c