]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mvneta: fix race condition in mvneta_tx()
authorEric Dumazet <edumazet@google.com>
Tue, 2 Dec 2014 12:30:59 +0000 (04:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:39:05 +0000 (09:39 -0800)
commite7b7e0c27cbd34f01c8a9493cd1aa509707610e3
treef012940686d37689231374f8550b0c6bd0b078fc
parent9823d713bf257e2e0dc5b6ea64f270d33e1212ee
net: mvneta: fix race condition in mvneta_tx()

[ Upstream commit 5f478b41033606d325e420df693162e2524c2b94 ]

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