Re: [Qemu-devel] [PATCH v2] nbd: release exp->blk after all clients are closed

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 10:35, Wen Congyang wrote: > 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 > Signed-off-by: Wen

[Qemu-devel] [PATCH v2] nbd: release exp->blk after all clients are closed

2015-09-16 Thread Wen Congyang
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 Signed-off-by: Wen Congyang --- nbd.c | 21 +++-- 1 f