xen-netback: Fix pointer incrementation to avoid incorrect logging
authorZoltan Kiss <zoltan.kiss@citrix.com>
Fri, 18 Jul 2014 18:08:05 +0000 (19:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2014 03:56:06 +0000 (20:56 -0700)
Due to this pointer is increased prematurely, the error log contains rubbish.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Reported-by: Armin Zentai <armin.zentai@ezit.hu>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c

index 6fff911dc13414103dc8294ff4929e4e18eaf1c3..c65b636bcab9dfb3bdf3528bd3d0fcd30f7a5812 100644 (file)
@@ -1045,7 +1045,6 @@ static int xenvif_tx_check_gop(struct xenvif_queue *queue,
 
        /* Check status of header. */
        err = (*gopp_copy)->status;
-       (*gopp_copy)++;
        if (unlikely(err)) {
                if (net_ratelimit())
                        netdev_dbg(queue->vif->dev,
@@ -1058,6 +1057,7 @@ static int xenvif_tx_check_gop(struct xenvif_queue *queue,
                        xenvif_idx_release(queue, pending_idx,
                                           XEN_NETIF_RSP_ERROR);
        }
+       (*gopp_copy)++;
 
 check_frags:
        for (i = 0; i < nr_frags; i++, gop_map++) {