]> git.baikalelectronics.ru Git - kernel.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)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 13 Jun 2017 20:09:41 +0000 (16:09 -0400)
commit80e7db29a1ee4c1c620283f1a5392d5db2b1f2a4
tree3a7679bd60a7d022a8fc9cf72491bb9173abac4e
parent1d34bf3493ed2a5d4c035904426f4f7be655fd83
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>
drivers/block/xen-blkback/xenbus.c