Anil Madhavapeddy
2011-Nov-23 16:14 UTC
[PATCH] fix segfault in libvchan client error path
# HG changeset patch # User Anil Madhavapeddy <anil@recoil.org> # Date 1322064942 0 # Node ID 2934afb3348776eaad57d0d91893f00c862ac507 # Parent 0a0c02a616768bfab16c072788cb76be1893c37f In libvchan_client_init, go to the error path if the gntdev device is not available. Otherwise, a segfault happens later as the vchan context is invalid. Signed-off-by: Anil Madhavapeddy <anil@recoil.org> diff -r 0a0c02a61676 -r 2934afb33487 tools/libvchan/init.c --- a/tools/libvchan/init.c Mon Nov 21 21:28:34 2011 +0000 +++ b/tools/libvchan/init.c Wed Nov 23 16:15:42 2011 +0000 @@ -385,7 +385,7 @@ ctrl->gnttab = xc_gnttab_open(logger, 0); if (!ctrl->gnttab) - goto out; + goto fail; // set up event channel if (init_evt_cli(ctrl, domain, logger))
Anil Madhavapeddy writes ("[Xen-devel] [PATCH] fix segfault in libvchan client error path"):> In libvchan_client_init, go to the error path if the gntdev device is not > available. Otherwise, a segfault happens later as the vchan context is > invalid. > > Signed-off-by: Anil Madhavapeddy <anil@recoil.org>Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>