Skip to content

Commit 975ef94

Browse files
SinkFinderjgross1
authored andcommitted
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>
1 parent 1236641 commit 975ef94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/xen/pvcalls-front.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ static int create_active(struct sock_mapping *map, int *evtchn)
385385
out_error:
386386
if (*evtchn >= 0)
387387
xenbus_free_evtchn(pvcalls_front_dev, *evtchn);
388-
kfree(map->active.data.in);
389-
kfree(map->active.ring);
388+
free_pages((unsigned long)map->active.data.in, PVCALLS_RING_ORDER);
389+
free_page((unsigned long)map->active.ring);
390390
return ret;
391391
}
392392

0 commit comments

Comments
 (0)