From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org
Cc: alxndr@bu.edu, Jason Wang <jasowang@redhat.com>,
philmd@redhat.com, qemu-security@nongnu.org, ppandit@redhat.com
Subject: [PATCH V3 06/10] tx_pkt: switch to use qemu_receive_packet_iov() for loopback
Date: Tue, 2 Mar 2021 13:54:55 +0800 [thread overview]
Message-ID: <20210302055500.51954-7-jasowang@redhat.com> (raw)
In-Reply-To: <20210302055500.51954-1-jasowang@redhat.com>
This patch switches to use qemu_receive_receive_iov() which can detect
reentrancy and return early.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/net_tx_pkt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c
index da262edc3e..1f9aa59eca 100644
--- a/hw/net/net_tx_pkt.c
+++ b/hw/net/net_tx_pkt.c
@@ -553,7 +553,7 @@ static inline void net_tx_pkt_sendv(struct NetTxPkt *pkt,
NetClientState *nc, const struct iovec *iov, int iov_cnt)
{
if (pkt->is_loopback) {
- nc->info->receive_iov(nc, iov, iov_cnt);
+ qemu_receive_packet_iov(nc, iov, iov_cnt);
} else {
qemu_sendv_packet(nc, iov, iov_cnt);
}
--
2.24.3 (Apple Git-128)
next prev parent reply other threads:[~2021-03-02 5:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 5:54 [PATCH V3 00/10] Detect reentrant RX casued by loopback Jason Wang
2021-03-02 5:54 ` [PATCH V3 01/10] net: introduce qemu_receive_packet() Jason Wang
2021-03-02 5:54 ` [PATCH V3 02/10] e1000: switch to use qemu_receive_packet() for loopback Jason Wang
2021-03-02 5:54 ` [PATCH V3 03/10] dp8393x: switch to use qemu_receive_packet() for loopback packet Jason Wang
2021-03-02 7:00 ` Philippe Mathieu-Daudé
2021-03-02 5:54 ` [PATCH V3 04/10] msf2-mac: switch to use qemu_receive_packet() for loopback Jason Wang
2021-03-02 5:54 ` [PATCH V3 05/10] sungem: " Jason Wang
2021-03-02 7:13 ` Mark Cave-Ayland
2021-03-02 5:54 ` Jason Wang [this message]
2021-03-02 5:54 ` [PATCH V3 07/10] rtl8139: " Jason Wang
2021-03-02 6:59 ` Philippe Mathieu-Daudé
2021-03-02 5:54 ` [PATCH V2 7/7] rtl8193: " Jason Wang
2021-03-02 6:39 ` P J P
2021-03-02 6:52 ` Jason Wang
2021-03-02 5:54 ` [PATCH V3 08/10] pcnet: " Jason Wang
2021-03-02 5:54 ` [PATCH V3 09/10] cadence_gem: " Jason Wang
2021-03-02 6:59 ` Philippe Mathieu-Daudé
2021-03-02 5:55 ` [PATCH V3 10/10] lan9118: " Jason Wang
2021-03-02 7:00 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210302055500.51954-7-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=alxndr@bu.edu \
--cc=philmd@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-security@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).