]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd/server: add additional assert to nbd_export_put
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 7 Dec 2017 15:50:57 +0000 (18:50 +0300)
committerEric Blake <eblake@redhat.com>
Tue, 9 Jan 2018 18:53:44 +0000 (12:53 -0600)
commit9156245ec49b36d934ed09d49ffbd5dd37285374
tree79136c40765a7a3c320f09d1e169af3d2476513e
parent3cee4db661ab9c0fce7937b3bbfa188a1845f31f
nbd/server: add additional assert to nbd_export_put

This place is not obvious, nbd_export_close may theoretically reduce
refcount to 0. It may happen if someone calls nbd_export_put on named
export not through nbd_export_set_name when refcount is 1.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20171207155102.66622-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
nbd/server.c