]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/netback: Calculate the number of SKB slots required correctly
authorSimon Graham <simon.graham@citrix.com>
Thu, 24 May 2012 06:26:07 +0000 (06:26 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 14 Jun 2012 08:35:58 +0000 (12:35 +0400)
commit5176ff9409865862a6905db8c51804c75870d96c
treea9e05750d90c53da536f0cf72458eb3e3d2bf33b
parent79087584f0f258da129c441dab108b8eb3cea8d4
xen/netback: Calculate the number of SKB slots required correctly

When calculating the number of slots required for a packet header, the code
was reserving too many slots if the header crossed a page boundary. Since
netbk_gop_skb copies the header to the start of the page, the count of
slots required for the header should be based solely on the header size.

This problem is easy to reproduce if a VIF is bridged to a USB 3G modem
device as the skb->data value always starts near the end of the first page.

Signed-off-by: Simon Graham <simon.graham@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e26b203ede31fffd52571a5ba607a26c79dc5c0d)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/xen-netback/netback.c