]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd: release exp->blk after all clients are closed
authorWen Congyang <wency@cn.fujitsu.com>
Wed, 16 Sep 2015 08:35:46 +0000 (16:35 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 03:55:05 +0000 (22:55 -0500)
commit78aeb6984cedf8efdc6a007fddaed46d55a07edf
treeac3510120f0306a26ebbe1c1285ac725aa74399d
parent6d62d0e3dd47cbdc8a486a7c99cb0c07a1b916d8
nbd: release exp->blk after all clients are closed

If the socket fd is shutdown, there may be some data which is received before
shutdown. We will read the data and do read/write in nbd_trip(). But the exp's
blk is NULL, and it will cause qemu crashed.

Reported-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Message-Id: <55F929E2.1020501@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit d6268348493f32ecc096caa637620757472a1196)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
nbd.c