|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] netback: fix off by one determining when to copy a RX skb
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1441785095 -7200
# Node ID 36fb301948766f3ac9efbf87f16595d50dbc41b9
# Parent 9c891c830cddb69cca1cf6e908cafdfaa5e895af
netback: fix off by one determining when to copy a RX skb
Copying is needed only when page offset plus length of head exceeds
PAGE_SIZE, not when their sum equals it.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
diff -r 9c891c830cdd -r 36fb30194876 drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c Wed Sep 09 09:49:03 2015 +0200
+++ b/drivers/xen/netback/netback.c Wed Sep 09 09:51:35 2015 +0200
@@ -309,7 +309,7 @@ int netif_be_start_xmit(struct sk_buff *
* boundary, because netbk_gop_skb can't handle them.
*/
if (!netif->copying_receiver ||
- ((skb_headlen(skb) + offset_in_page(skb->data)) >= PAGE_SIZE)) {
+ ((offset_in_page(skb->data) + skb_headlen(skb)) > PAGE_SIZE)) {
struct sk_buff *nskb = netbk_copy_skb(skb);
if ( unlikely(nskb == NULL) )
goto drop;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |