diff options
author | Stefan Wahren | 2017-05-26 00:26:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-05-29 17:02:30 +0200 |
commit | 025f69ade93952e9415ea5c5f48d729b03e04dfc (patch) | |
tree | a2a82089d8c89c98e1f6741798f87d9c1503234a /drivers/staging/vc04_services/interface | |
parent | staging: vchiq_2835_arm: Fix function name cleaup_pagelistinfo (diff) | |
download | kernel-qcow2-linux-025f69ade93952e9415ea5c5f48d729b03e04dfc.tar.gz kernel-qcow2-linux-025f69ade93952e9415ea5c5f48d729b03e04dfc.tar.xz kernel-qcow2-linux-025f69ade93952e9415ea5c5f48d729b03e04dfc.zip |
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>
Diffstat (limited to 'drivers/staging/vc04_services/interface')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 8911e86a2cce..eeeee1bf68b7 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -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; |