All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Bulekov <alxndr@bu.edu>
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] pcnet: switch to use qemu_receive_packet() for loopback
Date: Mon,  1 Mar 2021 10:33:34 -0500	[thread overview]
Message-ID: <20210301153334.81021-1-alxndr@bu.edu> (raw)
In-Reply-To: <20210301073947.39451-1-jasowang@redhat.com>

This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.

Buglink: https://bugs.launchpad.net/qemu/+bug/1917085
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---

Here's another one, that looks like the same issue.
-Alex

 hw/net/pcnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index f3f18d8598..dcd3fc4948 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -1250,7 +1250,7 @@ txagain:
             if (BCR_SWSTYLE(s) == 1)
                 add_crc = !GET_FIELD(tmd.status, TMDS, NOFCS);
             s->looptest = add_crc ? PCNET_LOOPTEST_CRC : PCNET_LOOPTEST_NOCRC;
-            pcnet_receive(qemu_get_queue(s->nic), s->buffer, s->xmit_pos);
+            qemu_receive_packet(qemu_get_queue(s->nic), s->buffer, s->xmit_pos);
             s->looptest = 0;
         } else {
             if (s->nic) {
-- 
2.28.0



       reply	other threads:[~2021-03-01 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210301073947.39451-1-jasowang@redhat.com>
2021-03-01 15:33 ` Alexander Bulekov [this message]
2021-03-01 19:08   ` [PATCH] pcnet: switch to use qemu_receive_packet() for loopback Philippe Mathieu-Daudé
2021-03-01 19:33 ` [PATCH] cadence_gem: " Alexander Bulekov
2021-03-09 14:26   ` Alistair Francis
2021-03-01 19:35 ` [PATCH] lan9118: " Alexander Bulekov

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=20210301153334.81021-1-alxndr@bu.edu \
    --to=alxndr@bu.edu \
    --cc=jasowang@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.