OSDN Git Service

qed: Fix system crash in ll2 xmit
authorManish Chopra <manishc@marvell.com>
Mon, 28 Jan 2019 18:05:07 +0000 (10:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2019 19:13:34 +0000 (11:13 -0800)
commit7c81626a3c37e4ac320b8ad785694ba498f24794
treef43a8ba64bcd383bd5554237222fd7c351e61134
parent327852ec64205bb651be391a069784872098a3b2
qed: Fix system crash in ll2 xmit

Cache number of fragments in the skb locally as in case
of linear skb (with zero fragments), tx completion
(or freeing of skb) may happen before driver tries
to get number of frgaments from the skb which could
lead to stale access to an already freed skb.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_ll2.c