net: fec: fix potential use after free
authorEric Dumazet <edumazet@google.com>
Thu, 19 Dec 2013 18:53:02 +0000 (10:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Dec 2013 23:03:25 +0000 (18:03 -0500)
commit7a2a84518cfb263d2c4171b3d63671f88316adb2
tree99ab1fb5d7948c8d959032232fc546928703b62e
parentc047e0707307717818542c939223fc8ca454e2c9
net: fec: fix potential use after free

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.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: de5fb0a05348 ("net: fec: put tx to napi poll function to fix dead lock")
Cc: Frank Li <Frank.Li@freescale.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c