Message ID | 20210224055401.492407-5-jasowang@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Detect reentrant RX casue by loopback | expand |
On 2/24/21 6:53 AM, Jason Wang wrote: > This patch switches to use qemu_receive_packet() which can detect > reentrancy and return early. > > Signed-off-by: Jason Wang <jasowang@redhat.com> > --- > hw/net/msf2-emac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c index 32ba9e8412..3e6206044f 100644 --- a/hw/net/msf2-emac.c +++ b/hw/net/msf2-emac.c @@ -158,7 +158,7 @@ static void msf2_dma_tx(MSF2EmacState *s) * R_CFG1 bit 0 is set. */ if (s->regs[R_CFG1] & R_CFG1_LB_EN_MASK) { - nc->info->receive(nc, buf, size); + qemu_receive_packet(nc, buf, size); } else { qemu_send_packet(nc, buf, size); }
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. Signed-off-by: Jason Wang <jasowang@redhat.com> --- hw/net/msf2-emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)