1
0
Fork 0
alistair23-linux/drivers/net
Jan Beulich 093b9c71b6 xen-netfront: pull on receive skb may need to happen earlier
Due to commit 3683243b ("xen-netfront: use __pskb_pull_tail to ensure
linear area is big enough on RX") xennet_fill_frags() may end up
filling MAX_SKB_FRAGS + 1 fragments in a receive skb, and only reduce
the fragment count subsequently via __pskb_pull_tail(). That's a
result of xennet_get_responses() allowing a maximum of one more slot to
be consumed (and intermediately transformed into a fragment) if the
head slot has a size less than or equal to RX_COPY_THRESHOLD.

Hence we need to adjust xennet_fill_frags() to pull earlier if we
reached the maximum fragment count - due to the described behavior of
xennet_get_responses() this guarantees that at least the first fragment
will get completely consumed, and hence the fragment count reduced.

In order to not needlessly call __pskb_pull_tail() twice, make the
original call conditional upon the pull target not having been reached
yet, and defer the newly added one as much as possible (an alternative
would have been to always call the function right before the call to
xennet_fill_frags(), but that would imply more frequent cases of
needing to call it twice).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: stable@vger.kernel.org (3.6 onwards)
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-17 12:51:19 -07:00
..
appletalk appletalk: remove "config IPDDP_DECAP" 2013-03-22 10:21:09 -04:00
arcnet drivers/net: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:27:33 -07:00
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-03 14:55:13 -07:00
caif drivers/net: caif: fix wrong rtnl_is_locked() usage 2013-07-09 12:55:48 -07:00
can drivers/net/can/c_can: don't use devm_pinctrl_get_select_default() in probe 2013-07-11 17:18:26 -07:00
cris
dsa
ethernet be2net: Fix to avoid hardware workaround when not needed 2013-07-16 13:01:57 -07:00
fddi net/fddi/skfp/skfddi: Use module_pci_driver to register driver 2013-05-22 14:35:05 -07:00
hamradio net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
hippi net/hippi/rrunner: Use module_pci_driver to register driver 2013-05-22 14:35:05 -07:00
hyperv hyperv: Fix the NETIF_F_SG flag setting in netvsc 2013-07-16 23:02:24 -07:00
ieee802154 drivers/net/ieee802154: don't use devm_pinctrl_get_select_default() in probe 2013-07-11 17:18:27 -07:00
irda net: irda: remove unnecessary platform_set_drvdata() 2013-05-27 22:34:51 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
plip net: add ETH_P_802_3_MIN 2013-03-28 01:20:42 -04:00
ppp net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-19 16:49:39 -07:00
usb usb/net/r815x: fix cast to restricted __le32 2013-07-12 16:13:34 -07:00
vmxnet3 net: vlan: add protocol argument to packet tagging functions 2013-04-19 14:46:06 -04:00
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-03 14:55:13 -07:00
wimax Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
xen-netback xen-netback: xenbus.c: use more current logging styles 2013-07-02 00:52:55 -07:00
Kconfig packet: nlmon: virtual netlink monitoring device for packet sockets 2013-06-24 16:39:05 -07:00
LICENSE.SRC
Makefile packet: nlmon: virtual netlink monitoring device for packet sockets 2013-06-24 16:39:05 -07:00
Space.c
dummy.c dummy: fix oops when loading the dummy failed 2013-07-11 11:59:20 -07:00
eql.c
ifb.c ifb: fix oops when loading the ifb failed 2013-07-11 12:00:05 -07:00
loopback.c
macvlan.c macvtap: Let TUNSETOFFLOAD actually controll offload features. 2013-06-25 16:44:56 -07:00
macvtap.c macvtap: do not assume 802.1Q when send vlan packets 2013-07-16 13:01:57 -07:00
mdio.c
mii.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
nlmon.c nlmon: use standard rtnetlink link api for add/del devices 2013-07-02 12:53:17 -07:00
ntb_netdev.c ntb_netdev: remove from list on exit 2013-05-15 10:58:14 -07:00
rionet.c rapidio/rionet: rework driver initialization and removal 2013-07-03 16:08:04 -07:00
sb1000.c
sungem_phy.c
tun.c tuntap: correctly linearize skb when zerocopy is used 2013-07-10 18:45:52 -07:00
veth.c veth: remove redundant call of dev_alloc_name 2013-06-12 01:21:20 -07:00
virtio_net.c No real surprises. 2013-07-10 14:50:58 -07:00
vxlan.c vxlan: add necessary locking on device removal 2013-07-17 12:51:19 -07:00
xen-netfront.c xen-netfront: pull on receive skb may need to happen earlier 2013-07-17 12:51:19 -07:00