mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
staging: vchiq_2835_arm: Handle vmalloc_to_page error case
In case vmalloc_to_page returns NULL create_pagelist must abort imediatly. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
804980adb9
commit
025f69ade9
1 changed files with 5 additions and 0 deletions
|
@ -459,6 +459,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
|
|||
PAGE_SIZE));
|
||||
size_t bytes = PAGE_SIZE - off;
|
||||
|
||||
if (!pg) {
|
||||
cleanup_pagelistinfo(pagelistinfo);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (bytes > length)
|
||||
bytes = length;
|
||||
pages[actual_pages] = pg;
|
||||
|
|
Loading…
Reference in a new issue