forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
132fab1363
commit
f45a43d847
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user