staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 3 Sep 2017 17:06:31 +0000 (19:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 10:25:31 +0000 (12:25 +0200)
commit974d4d03fc020af4fa4e9e72a86f0fefa37803c5
treed6f9b20b674e74c0c673a2e8c8874626426b53ef
parente5f5d0e20b6cecc0ebe6fc8e7df6f8823ad2d594
staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist

This fixes a NULL pointer dereference on RPi 2 with multi_v7_defconfig.
The function page_address() could return NULL with enabled CONFIG_HIGHMEM.
So fix this by using kmap() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c