* [patch 11/24] s390: missing check in dasd_eer_open.
@ 2006-06-14 14:02 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-06-14 14:02 UTC (permalink / raw)
To: linux-kernel, wein
From: Stefan Weinhuber <wein@de.ibm.com>
[S390] missing check in dasd_eer_open.
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 | 2 ++
1 files changed, 2 insertions(+)
diff -urpN linux-2.6/drivers/s390/block/dasd_eer.c linux-2.6-patched/drivers/s390/block/dasd_eer.c
--- linux-2.6/drivers/s390/block/dasd_eer.c 2006-06-14 14:29:18.000000000 +0200
+++ linux-2.6-patched/drivers/s390/block/dasd_eer.c 2006-06-14 14:29:45.000000000 +0200
@@ -521,6 +521,8 @@ static int dasd_eer_open(struct inode *i
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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-14 14:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-14 14:02 [patch 11/24] s390: missing check in dasd_eer_open Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox