net: mvneta: fix race condition in mvneta_tx()
authorEric Dumazet <edumazet@google.com>
Tue, 2 Dec 2014 12:30:59 +0000 (04:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 01:55:36 +0000 (20:55 -0500)
commit5f478b41033606d325e420df693162e2524c2b94
tree0ed69fd5adca03e94ad27abdd6d09c411ce4004b
parentaebea2ba0f7495e1a1c9ea5e753d146cb2f6b845
net: mvneta: fix race condition in mvneta_tx()

mvneta_tx() dereferences skb to get skb->len too late,
as hardware might have completed the transmit and TX completion
could have freed the skb from another cpu.

Fixes: 71f6d1b31fb1 ("net: mvneta: replace Tx timer with a real interrupt")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c