summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2017-05-18 18:28:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-29 14:00:27 +0300
commite5c49c1703ae906a8f41f58aabd5258a06fc9e6d (patch)
treee7bc575f341c1aa1957aa794edaa75f9c3f1dd6e /drivers/dma
parent0e051f17bd048d96eb533f1b8f436f3b27c6109b (diff)
downloadlinux-e5c49c1703ae906a8f41f58aabd5258a06fc9e6d.tar.xz
xen/blkback: fix disconnect while I/Os in flight
commit 46464411307746e6297a034a9983a22c9dfc5a0c upstream. Today disconnecting xen-blkback is broken in case there are still I/Os in flight: xen_blkif_disconnect() will bail out early without releasing all resources in the hope it will be called again when the last request has terminated. This, however, won't happen as xen_blkif_free() won't be called on termination of the last running request: xen_blkif_put() won't decrement the blkif refcnt to 0 as xen_blkif_disconnect() didn't finish before thus some xen_blkif_put() calls in xen_blkif_disconnect() didn't happen. To solve this deadlock xen_blkif_disconnect() and xen_blkif_alloc_rings() shouldn't use xen_blkif_put() and xen_blkif_get() but use some other way to do their accounting of resources. This at once fixes another error in xen_blkif_disconnect(): when it returned early with -EBUSY for another ring than 0 it would call xen_blkif_put() again for already handled rings on a subsequent call. This will lead to inconsistencies in the refcnt handling. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma')
0 files changed, 0 insertions, 0 deletions