]> xenbits.xensource.com Git - xen.git/commit
tools/ocaml/libs/xb: Do not crash after xenbus is unmapped
authorEdwin Török <edvin.torok@citrix.com>
Fri, 15 Jan 2021 18:23:10 +0000 (18:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Jan 2021 14:40:29 +0000 (14:40 +0000)
commit5e317896342d553f0b55f72948bbf93a0f1147d3
treeace0c4defe64f00fe41b5d83c561f723133c1482
parentf437314e869fa4a041e30dc1d570c26fa852ca48
tools/ocaml/libs/xb: Do not crash after xenbus is unmapped

Xenmmap.unmap sets the address to MAP_FAILED in xenmmap_stubs.c.  If due to a
bug there were still references to the Xenbus and we attempt to use it then we
crash.  Raise an exception instead of crashing.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/libs/xb/xs_ring_stubs.c