From: damuzi000 Date: Fri, 17 Jan 2014 15:47:59 +0000 (+0800) Subject: net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp X-Git-Tag: v3.14-rc1~94^2~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75e4364f67d9cb996f9a6ff982ad9b3700648591;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed