[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 39/67] net: rtl8139: limit processing of ring descri
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 39/67] net: rtl8139: limit processing of ring descriptors |
Date: |
Wed, 14 Dec 2016 18:44:33 -0600 |
From: Prasad J Pandit <address@hidden>
RTL8139 ethernet controller in C+ mode supports multiple
descriptor rings, each with maximum of 64 descriptors. While
processing transmit descriptor ring in 'rtl8139_cplus_transmit',
it does not limit the descriptor count and runs forever. Add
check to avoid it.
Reported-by: Andrew Henderson <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
(cherry picked from commit c7c35916692fe010fef25ac338443d3fe40be225)
Signed-off-by: Michael Roth <address@hidden>
---
hw/net/rtl8139.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 3345bc6..f05e59c 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -2350,7 +2350,7 @@ static void rtl8139_cplus_transmit(RTL8139State *s)
{
int txcount = 0;
- while (rtl8139_cplus_transmit_one(s))
+ while (txcount < 64 && rtl8139_cplus_transmit_one(s))
{
++txcount;
}
--
1.9.1
- [Qemu-devel] [PATCH 25/67] block: reintroduce bdrv_flush_all, (continued)
- [Qemu-devel] [PATCH 25/67] block: reintroduce bdrv_flush_all, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 26/67] qemu: use bdrv_flush_all for vm_stop et al, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 30/67] qht: fix unlock-after-free segfault upon resizing, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 27/67] block-backend: remove blk_flush_all, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 02/67] hw/ppc/spapr: Move code related to "ibm, pa-features" to a separate function, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 33/67] qapi: Fix crash when 'any' or 'null' parameter is missing, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 29/67] qht: simplify qht_reset_size, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 31/67] char: fix missing return in error path for chardev TLS init, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 28/67] migrate: Fix cpu-throttle-increment regression in HMP, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 36/67] ppc/kvm: Mark 64kB page size support as disabled if not available, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 39/67] net: rtl8139: limit processing of ring descriptors,
Michael Roth <=
- [Qemu-devel] [PATCH 32/67] qmp: fix object-add assert() without props, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 35/67] rbd: shift byte count as a 64-bit value, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 34/67] tests/test-qmp-input-strict: Cover missing struct members, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 37/67] throttle: Correct access to wrong BlockBackendPublic structures, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 44/67] target-ppc: Fix CPU migration from qemu-2.6 <-> later versions, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 38/67] qemu-iotests: Test I/O in a single drive from a throttling group, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 03/67] hw/ppc/spapr: Fix the selection of the processor features, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 46/67] virtio-net: mark VIRTIO_NET_F_GSO as legacy, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 43/67] net: fix sending of data with -net socket, listen backend, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 40/67] memory: Replace skip_dump flag with "ram_device", Michael Roth, 2016/12/14