Skip to content

Commit

Permalink
[S390] missing check in dasd_eer_open.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Weinhuber authored and Martin Schwidefsky committed Jun 29, 2006
1 parent 132fab1 commit f45a43d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/s390/block/dasd_eer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f45a43d

Please sign in to comment.