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

From: Greg Kroah-Hartman
Date: Tue Feb 26 2013 - 19:07:51 EST


3.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ian Campbell <ian.campbell@xxxxxxxxxx>

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@xxxxxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/