diff options
author | damuzi000 <damuzi000@gmail.com> | 2014-01-17 15:47:59 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-20 04:02:45 (GMT) |
commit | 75e4364f67d9cb996f9a6ff982ad9b3700648591 (patch) | |
tree | 429b1772db926d6fe70a1cad56353d890c1e87b9 /crypto | |
parent | af0bd4e9ba809391f275d0c094ac0bfbfbb3f430 (diff) | |
download | linux-75e4364f67d9cb996f9a6ff982ad9b3700648591.tar.xz |
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: Bruce Liu <damuzi000@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions