aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2018-11-22 10:07:12 +0800
committerJuergen Gross <jgross@suse.com>2018-11-29 17:53:33 +0100
commit975ef94a0284648fb0137bd5e949b18cef604e33 (patch)
treed1bb5234946209787b26a8d750572d7dcaffdec0 /drivers/xen
parentRevert "xen/balloon: Mark unallocated host memory as UNUSABLE" (diff)
downloadlinux-dev-975ef94a0284648fb0137bd5e949b18cef604e33.tar.xz
linux-dev-975ef94a0284648fb0137bd5e949b18cef604e33.zip
pvcalls-front: fixes incorrect error handling
kfree() is incorrectly used to release the pages allocated by __get_free_page() and __get_free_pages(). Use the matching deallocators i.e., free_page() and free_pages(), respectively. Signed-off-by: Pan Bian <bianpan2016@163.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/pvcalls-front.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 2f11ca72a281..77224d8f3e6f 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -385,8 +385,8 @@ static int create_active(struct sock_mapping *map, int *evtchn)
out_error:
if (*evtchn >= 0)
xenbus_free_evtchn(pvcalls_front_dev, *evtchn);
- kfree(map->active.data.in);
- kfree(map->active.ring);
+ free_pages((unsigned long)map->active.data.in, PVCALLS_RING_ORDER);
+ free_page((unsigned long)map->active.ring);
return ret;
}