Commit 99975cc
committed
vhost/net: length miscalculation
commit 8b38694
vhost/net: virtio 1.0 byte swap
had this chunk:
- heads[headcount - 1].len += datalen;
+ heads[headcount - 1].len = cpu_to_vhost32(vq, len - datalen);
This adds datalen with the wrong sign, causing guest panics.
Fixes: 8b38694
Reported-by: Alex Williamson <[email protected]>
Suggested-by: Greg Kurz <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>1 parent a1eb03f commit 99975cc
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | | - | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| |||
0 commit comments