[ 10/53] xen/netback: check correct frag when looking for head frag

Greg Kroah-Hartman
2013-02-26T23:59:00Z

From: Ian Campbell <ian.campbell@citrix.com>

When I backported 7d5145d8eb2b "xen/netback: don't leak pages on failure in
xen_netbk_tx_check_gop" to 3.0 (where it became f0457844e605) I somehow picked
up an extraneous hunk breaking this.

Reported-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
drivers/net/xen-netback/netback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -990,7 +990,7 @@ static int xen_netbk_tx_check_gop(struct
xen_netbk_idx_release(netbk, pending_idx, XEN_NETIF_RSP_ERROR);

/* Skip first skb fragment if it is on same page as header fragment. */
- start = ((unsigned long)shinfo->frags[i].page == pending_idx);
+ start = ((unsigned long)shinfo->frags[0].page == pending_idx);

for (i = start; i < nr_frags; i++) {
int j, newerr;