mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
A small fixup for the persistent storage subsystem. The bug can prevent
kernel booting on a APEI-enabled machines w/ CONFIG_PSTORE_CONSOLE=y (this is N by default, though). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAABAgAGBQJQpFo9AAoJEGgI9fZJve1bzCwQAJPEkbARp6KEjUMF4UHfxot7 DPtzLHTXR4hnuI75OP1yE2tSeyiWGUX8Pay91tYjMr92xSFXAmAd0YV7f4eA48dy RXZiCkRft5W7FJvg3uM9RCvNEpbNwm5ZBy/NkxIn8mgIO+OAkhT0bedV5RNmGLx+ gCRb99XhwYFFF2+DzcedWAhUHDTHF9AF1yQg9z7eL/1qxEEUMTbvI9yyx4smZ2wd OPQWoXvTsTJyivnRtLDMzWu3MXAB6NSpymw4LEV03Q7eAA8VdfQCgMvwfxUpxnwY VM6E00hpD1foFfe8QTiIcSRvDqZAGGP4/dXoULaiLEmslwSfaBa/vhyA9G+JYeAO HcJwL3n0kjOTZ4wfNXb+DEXNVz+lqFawuFqfh76WHNqCf9K+X2US4Q6KPD/8nHRY ZEJEK2xmAFilwDWr+fTTx1EO5AT6uhk2MYECnZ+EALb8tWpy+JXhArCYS7ssk7Nv Y505nQbvrt3ELztzX58jswINKQPM/bgWNF8zupBscpsNS8a+5DA+CQ/8y8l3Mr2k 2mE4EUR6r8ou56MEfjqgBC1Dz39QRKPUZIts8ggPYptSrUJoN48ioVN2eZhau13D wJqP/sAAZJCUCgr3Xn3UUxiUOw/z4L7eA2JtEQsc5WOfv+lWZm8eAupvmldUZee0 qAMIdx807XnivkAavIp+ =CmNn -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
006b956807
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user