mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[S390] missing check in dasd_eer_open.
Check the return value of kzalloc in dasd_eer_open. Signed-off-by: Stefan Weinhuber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
132fab1363
commit
f45a43d847
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue