]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:08:26 +0000 (08:08 -0700)
[ Upstream commit d8cfbfc4660054150ca1b7c501a8edc0771022f9 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netback/netback.c

index 2c5a6f9f61d8113d6d1798ae5ca5cb2742aaa49b..034645a2978f68a3619d8e27170b6b40abafc11f 100644 (file)
@@ -1022,7 +1022,6 @@ static int xenvif_tx_check_gop(struct xenvif *vif,
 
        /* Check status of header. */
        err = (*gopp_copy)->status;
-       (*gopp_copy)++;
        if (unlikely(err)) {
                if (net_ratelimit())
                        netdev_dbg(vif->dev,
@@ -1035,6 +1034,7 @@ static int xenvif_tx_check_gop(struct xenvif *vif,
                        xenvif_idx_release(vif, pending_idx,
                                           XEN_NETIF_RSP_ERROR);
        }
+       (*gopp_copy)++;
 
 check_frags:
        for (i = 0; i < nr_frags; i++, gop_map++) {