summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2012-03-07 11:17:48 +0800
committerMichael S. Tsirkin <mst@redhat.com>2012-03-16 01:04:50 +0200
commitcde31a0e3dc0e4ac83e454d6096350cec584adf1 (patch)
tree002b3822ae5914e645aa0ab60d24af1c76e6f6e5 /scripts
parent453058d3e7111632b795c85f7d3bb36df25d5beb (diff)
downloadqemu-cde31a0e3dc0e4ac83e454d6096350cec584adf1.tar.gz
qemu-cde31a0e3dc0e4ac83e454d6096350cec584adf1.tar.bz2
qemu-cde31a0e3dc0e4ac83e454d6096350cec584adf1.zip
rtl8139: limit transmission buffer size in c+ mode
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 <jasowang@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions