[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [1/6 V2 PATCH] rtl8139: limit transmission buffer size
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [1/6 V2 PATCH] rtl8139: limit transmission buffer size in c+ mode |
Date: |
Wed, 7 Mar 2012 08:13:51 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Mar 07, 2012 at 11:17:48AM +0800, Jason Wang wrote:
> The tx buffer would be re-allocated for tx descriptor with big size
> and without LS bit set, this would make guest driver could easily let
> qemu to allocate unlimited.
>
> In linux host, a glib failure were easy to be triggered:
>
> GLib-ERROR **: gmem.c:176: failed to allocate 18446744071562067968 bytes
>
> This patch fix this by adding a limit. As the spec didn't tell the maximum
> size
> of buffer allowed, stick it to current CP_TX_BUFFER_SIZE (65536).
>
> Changes from V1:
>
> Drop the while statement and s->cplus_txbuffer check.
>
> Signed-off-by: Jason Wang <address@hidden>
> ---
> hw/rtl8139.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
- [Qemu-devel] [PATCH 1/6] rtl8139: limit transmission buffer size in c+ mode, Jason Wang, 2012/03/04
- [Qemu-devel] [PATCH 2/6] rtl8139: remove unused marco, Jason Wang, 2012/03/04
- [Qemu-devel] [PATCH 4/6] net: move compute_mcast_idx() to net.h, Jason Wang, 2012/03/04
- [Qemu-devel] [PATCH 3/6] rtl8139: support byte read to TxStatus registers, Jason Wang, 2012/03/04
- [Qemu-devel] [PATCH 5/6] rtl8139: correctly check the opmode, Jason Wang, 2012/03/04
- [Qemu-devel] [PATCH 6/6] rtl8139: do the network/host communication only in normal operating mode, Jason Wang, 2012/03/04
- Re: [Qemu-devel] [PATCH 1/6] rtl8139: limit transmission buffer size in c+ mode, Stefan Hajnoczi, 2012/03/05
- [Qemu-devel] [1/6 V2 PATCH] rtl8139: limit transmission buffer size in c+ mode, Jason Wang, 2012/03/06
- Re: [Qemu-devel] [1/6 V2 PATCH] rtl8139: limit transmission buffer size in c+ mode,
Stefan Hajnoczi <=