Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen/pvcalls: Fix a check in pvcalls_front_remove()

bedata->ref can't be less than zero because it's unsigned. This affects
certain error paths in probe. We first set ->ref = -1 and then we set
it to a valid value later.

Fixes: 219681909913 ("xen/pvcalls: connect to the backend")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

authored by

Dan Carpenter and committed by
Boris Ostrovsky
1ab134ca 8c71fa88

+1 -1
+1 -1
drivers/xen/pvcalls-front.c
··· 1103 1103 kfree(map); 1104 1104 } 1105 1105 } 1106 - if (bedata->ref >= 0) 1106 + if (bedata->ref != -1) 1107 1107 gnttab_end_foreign_access(bedata->ref, 0, 0); 1108 1108 kfree(bedata->ring.sring); 1109 1109 kfree(bedata);