staging: fsl-dpaa2/eth: Fix skb use after free
authorBogdan Purcareata <bogdan.purcareata@nxp.com>
Thu, 20 Jul 2017 10:58:37 +0000 (10:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 15:25:03 +0000 (08:25 -0700)
commit3c70d958cf1ee81141d00ecbf54b4999060eeeaa
tree9521c76fa6c17c63ebe48fc7854f232715e2fe73
parent5be271ff96ec1a19c332bbb610662d83aa86799d
staging: fsl-dpaa2/eth: Fix skb use after free

Once a Tx frame descriptor is enqueued, an interrupt might be triggered
to process the Tx confirmation and free the skb, hitting a memory use
after free when updating the tx_bytes statistic based on skb->len.

Use the frame descriptor length instead.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c