search for: 06268a0

Displaying 2 results from an estimated 2 matches for "06268a0".

Did you mean: 01260a0
2014 Feb 12
1
[PATCH net] vhost_net: do not report a used len larger than receive buffer size
...vhost_net: a kernel-level virtio server) Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 9a68409..06268a0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -525,7 +525,8 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, ++headcount; seg += in; } - heads[headcount - 1].len += datalen; + if (likely(datalen < 0)) + heads[headcount - 1].len += datalen; *iovcount = seg; if (u...
2014 Feb 12
1
[PATCH net] vhost_net: do not report a used len larger than receive buffer size
...vhost_net: a kernel-level virtio server) Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 9a68409..06268a0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -525,7 +525,8 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, ++headcount; seg += in; } - heads[headcount - 1].len += datalen; + if (likely(datalen < 0)) + heads[headcount - 1].len += datalen; *iovcount = seg; if (u...