arc_emac: fix potential use after free
authorEric Dumazet <[email protected]>
Fri, 20 Dec 2013 02:10:40 +0000 (18:10 -0800)
committerDavid S. Miller <[email protected]>
Fri, 27 Dec 2013 18:00:31 +0000 (13:00 -0500)
commit37ec274e9713eafc2ba6c4471420f06cb8f68ecf
tree17ed7f410dcac72c1739e26bb01e957d2b8568ed
parent375679104ab3ccfd18dcbd7ba503734fb9a2c63a
arc_emac: fix potential use after free

Signed-off-by: Eric Dumazet <[email protected]>
skb_tx_timestamp(skb) should be called _before_ TX completion
has a chance to trigger, otherwise it is too late and we access
freed memory.

Fixes: e4f2379db6c6 ("ethernet/arc/arc_emac - Add new driver")
From: Eric Dumazet <[email protected]>
Cc: Alexey Brodkin <[email protected]>
Cc: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/arc/emac_main.c