diff mbox series

pcnet: switch to use qemu_receive_packet() for loopback

Message ID 20210301153334.81021-1-alxndr@bu.edu
State New
Headers show
Series pcnet: switch to use qemu_receive_packet() for loopback | expand

Commit Message

Alexander Bulekov March 1, 2021, 3:33 p.m. UTC
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(-)

Comments

Philippe Mathieu-Daudé March 1, 2021, 7:08 p.m. UTC | #1
On 3/1/21 4:33 PM, Alexander Bulekov wrote:
> 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(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

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) {