|
From: | Jason Wang |
Subject: | Re: [PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets() |
Date: | Mon, 18 May 2020 11:34:55 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 2020/5/11 下午12:21, Alexander Bulekov wrote:
On 200511 1204, Jason Wang wrote:The sender of packet will be checked in the qemu_net_queue_purge() but we use NetClientState not its peer when trying to purge the incoming queue in qemu_flush_or_purge_packets(). This will trigger the assert in virtio_net_reset since we can't pass the sender check. Fix by using the peer. Reported-by: "Alexander Bulekov" <address@hidden> Fixes: ca77d85e1dbf9 ("net: complete all queued packets on VM stop") Cc: address@hidden Signed-off-by: Jason Wang <address@hidden>Hi Jason, With this patch, I can no longer reproduce the crash Acked-by: Alexander Bulekov <address@hidden> Thanks!
Applied. Thanks
--- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 38778e831d..9e47cf727d 100644 --- a/net/net.c +++ b/net/net.c @@ -610,7 +610,7 @@ void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool purge) qemu_notify_event(); } else if (purge) { /* Unable to empty the queue, purge remaining packets */ - qemu_net_queue_purge(nc->incoming_queue, nc); + qemu_net_queue_purge(nc->incoming_queue, nc->peer); } }--2.20.1
[Prev in Thread] | Current Thread | [Next in Thread] |