]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/blkback: don't free be structure too early
authorJuergen Gross <jgross@suse.com>
Thu, 18 May 2017 15:28:48 +0000 (17:28 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Sep 2017 04:38:01 +0000 (21:38 -0700)
commit6dd7666b3ef4f3fe9c9107e7ffb4ba10253a184c
tree2d79857067e558b908d41313dd34b4e7e04e330e
parent549ec02c521e763ecb207f0f3ff368ce4137c2e6
xen/blkback: don't free be structure too early

The be structure must not be freed when freeing the blkif structure
isn't done. Otherwise a use-after-free of be when unmapping the ring
used for communicating with the frontend will occur in case of a
late call of xenblk_disconnect() (e.g. due to an I/O still active
when trying to disconnect).

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Steven Haigh <netwiz@crc.id.au>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
OraBug: 26662731

(cherry picked from commit 71df1d7ccad1c36f7321d6b3b48f2ea42681c363)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
drivers/block/xen-blkback/xenbus.c