[patch 11/24] s390: missing check in dasd_eer_open.

From: Martin Schwidefsky
Date: Wed Jun 14 2006 - 10:06:55 EST


From: Stefan Weinhuber <wein@xxxxxxxxxx>

[S390] missing check in dasd_eer_open.

Check the return value of kzalloc in dasd_eer_open.

Signed-off-by: Stefan Weinhuber <wein@xxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

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) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/