Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 75e4364f authored by damuzi000's avatar damuzi000 Committed by David S. Miller
Browse files

net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp



When timestamping is enabled, stmmac_tx_clean will call
stmmac_get_tx_hwtstamp to get tx TS.
But the skb can be NULL because the last of its tx_skbuff is NULL
if this packet frame is filled in more than one descriptors.

To fix the issue, change the code:
- Store TX skb to the tx_skbuff[] of frame's last segment.
- Check skb is not NULL in stmmac_get_tx_hwtstamp.

Signed-off-by: default avatarBruce Liu <damuzi000@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af0bd4e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment