提交 025f69ad 编写于 作者: S Stefan Wahren 提交者: Greg Kroah-Hartman

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: NStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 804980ad
...@@ -459,6 +459,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, ...@@ -459,6 +459,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
PAGE_SIZE)); PAGE_SIZE));
size_t bytes = PAGE_SIZE - off; size_t bytes = PAGE_SIZE - off;
if (!pg) {
cleanup_pagelistinfo(pagelistinfo);
return NULL;
}
if (bytes > length) if (bytes > length)
bytes = length; bytes = length;
pages[actual_pages] = pg; pages[actual_pages] = pg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册