[PATCH 03/17] kvm tools: net: don't propagate error codes from tx/rx operations

2014-02-04 Thread Will Deacon
Currently, if a ->tx or ->rx callback into the net_dev_operations encounters an error, it returns -1 to the virtio-net code, which in turn treats this as an unsigned (size_t) size describing the data available. The resulting memcpy operation then quickly explodes with a SEGV. This patch detects th

[PATCH 03/17] kvm tools: net: don't propagate error codes from tx/rx operations

2014-02-04 Thread Will Deacon
Currently, if a ->tx or ->rx callback into the net_dev_operations encounters an error, it returns -1 to the virtio-net code, which in turn treats this as an unsigned (size_t) size describing the data available. The resulting memcpy operation then quickly explodes with a SEGV. This patch detects th