aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-11-15 11:27:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-11-15 11:27:53 -0800
commit006b9568071ce6d65271b40f1f3e211434fa024e (patch)
tree914326e91b163e11a2104ad51f8b9424ba48f267 /fs
parente8017454ffb4e99f94b1a7e6dcb9ed519ee93441 (diff)
parent70a6f46d7b0ec03653b9ab3f8063a9717a4a53ef (diff)
Merge tag 'for-v3.7-fixes' of git://git.infradead.org/users/cbou/linux-pstore
Pull pstore fix from Anton Vorontsov: "A small fixup for the persistent storage subsystem. The bug can prevent kernel booting on a APEI-enabled machines w/ PSTORE_CONSOLE=y (this is N by default, though)." * tag 'for-v3.7-fixes' of git://git.infradead.org/users/cbou/linux-pstore: pstore: Fix NULL pointer dereference in console writes
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/platform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index a40da07e93d6..947fbe06c3b1 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -161,6 +161,7 @@ static void pstore_console_write(struct console *con, const char *s, unsigned c)
while (s < e) {
unsigned long flags;
+ u64 id;
if (c > psinfo->bufsize)
c = psinfo->bufsize;
@@ -172,7 +173,7 @@ static void pstore_console_write(struct console *con, const char *s, unsigned c)
spin_lock_irqsave(&psinfo->buf_lock, flags);
}
memcpy(psinfo->buf, s, c);
- psinfo->write(PSTORE_TYPE_CONSOLE, 0, NULL, 0, c, psinfo);
+ psinfo->write(PSTORE_TYPE_CONSOLE, 0, &id, 0, c, psinfo);
spin_unlock_irqrestore(&psinfo->buf_lock, flags);
s += c;
c = e - s;