diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-30 17:43:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:22 -0400 |
commit | 086ff4b3a7fb9cdf41e6a5d0ccd99b86d84633a1 (patch) | |
tree | bf7ab2f90ea3314eaa04e2614b6f848ba2c856ca /drivers/misc/lkdtm.c | |
parent | e04f228335bde305d2833e40382ed37fc36f9efe (diff) |
drivers/misc/lkdtm.c: fix missing allocation failure check
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44691
Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/lkdtm.c')
-rw-r--r-- | drivers/misc/lkdtm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 28adefe70f96..08aad69c8da4 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c | |||
@@ -477,6 +477,8 @@ static ssize_t lkdtm_debugfs_read(struct file *f, char __user *user_buf, | |||
477 | int i, n, out; | 477 | int i, n, out; |
478 | 478 | ||
479 | buf = (char *)__get_free_page(GFP_KERNEL); | 479 | buf = (char *)__get_free_page(GFP_KERNEL); |
480 | if (buf == NULL) | ||
481 | return -ENOMEM; | ||
480 | 482 | ||
481 | n = snprintf(buf, PAGE_SIZE, "Available crash types:\n"); | 483 | n = snprintf(buf, PAGE_SIZE, "Available crash types:\n"); |
482 | for (i = 0; i < ARRAY_SIZE(cp_type); i++) | 484 | for (i = 0; i < ARRAY_SIZE(cp_type); i++) |