projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
pstore/zone: Add a null pointer check to the psz_kmsg_read
[linux-2.6-microblaze.git]
/
fs
/
pstore
/
zone.c
diff --git
a/fs/pstore/zone.c
b/fs/pstore/zone.c
index
2770746
..
abca117
100644
(file)
--- a/
fs/pstore/zone.c
+++ b/
fs/pstore/zone.c
@@
-973,6
+973,8
@@
static ssize_t psz_kmsg_read(struct pstore_zone *zone,
char *buf = kasprintf(GFP_KERNEL, "%s: Total %d times\n",
kmsg_dump_reason_str(record->reason),
record->count);
+ if (!buf)
+ return -ENOMEM;
hlen = strlen(buf);
record->buf = krealloc(buf, hlen + size, GFP_KERNEL);
if (!record->buf) {