projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
132fab1
)
[S390] missing check in dasd_eer_open.
author
Stefan Weinhuber
<wein@de.ibm.com>
Thu, 29 Jun 2006 12:57:46 +0000
(14:57 +0200)
committer
Martin Schwidefsky
<schwidefsky@de.ibm.com>
Thu, 29 Jun 2006 12:57:46 +0000
(14:57 +0200)
Check the return value of kzalloc in dasd_eer_open.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_eer.c
patch
|
blob
|
history
diff --git
a/drivers/s390/block/dasd_eer.c
b/drivers/s390/block/dasd_eer.c
index
2d8af70
..
9d574ed
100644
(file)
--- a/
drivers/s390/block/dasd_eer.c
+++ b/
drivers/s390/block/dasd_eer.c
@@
-521,6
+521,8
@@
static int dasd_eer_open(struct inode *inp, struct file *filp)
unsigned long flags;
eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL);
+ if (!eerb)
+ return -ENOMEM;
eerb->buffer_page_count = eer_pages;
if (eerb->buffer_page_count < 1 ||
eerb->buffer_page_count > INT_MAX / PAGE_SIZE) {