xen-netfront: use correct linear area after linearizing an skb
commitf37f698e00694a1b30d2cee574003a2ce803c5de
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 9 Dec 2014 18:43:28 +0000 (9 18:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:37:11 +0000 (16 09:37 -0800)
tree308d15c4413f5b43ac9f5d129a4a74fa9fa1e4a4
parent4c60f294000b7c7e617c7f08ad04fd104cc6fbaf
xen-netfront: use correct linear area after linearizing an skb

[ Upstream commit 11d3d2a16cc1f05c6ece69a4392e99efb85666a6 ]

Commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d (xen-netfront: Fix
handling packets on compound pages with skb_linearize) attempted to
fix a problem where an skb that would have required too many slots
would be dropped causing TCP connections to stall.

However, it filled in the first slot using the original buffer and not
the new one and would use the wrong offset and grant access to the
wrong page.

Netback would notice the malformed request and stop all traffic on the
VIF, reporting:

    vif vif-3-0 vif3.0: txreq.offset: 85e, size: 4002, end: 6144
    vif vif-3-0 vif3.0: fatal error; disabling device

Reported-by: Anthony Wright <anthony@overnetdata.com>
Tested-by: Anthony Wright <anthony@overnetdata.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netfront.c