linux/drivers/net/ethernet/stmicro/stmmac
damuzi000 75e4364f67 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>
2014-01-19 20:02:45 -08:00
..
Kconfig net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's 2014-01-19 20:02:41 -08:00
Makefile net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's 2014-01-19 20:02:41 -08:00
chain_mode.c net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp 2014-01-19 20:02:45 -08:00
common.h drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
descs.h stmmac: code tidy-up 2013-04-08 16:55:27 -04:00
descs_com.h stmmac: code tidy-up 2013-04-08 16:55:27 -04:00
dwmac-sunxi.c net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's 2014-01-19 20:02:41 -08:00
dwmac100.h stmmac: add header inclusion protection 2012-08-24 13:25:05 -04:00
dwmac100_core.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac100_dma.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac1000.h stmmac: code tidy-up 2013-04-08 16:55:27 -04:00
dwmac1000_core.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac1000_dma.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac_dma.h stmicro: Remove extern from function prototypes 2013-09-24 12:54:08 -07:00
dwmac_lib.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
enh_desc.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
mmc.h stmicro: Remove extern from function prototypes 2013-09-24 12:54:08 -07:00
mmc_core.c stmmac: prevent interrupt loop with MMC RX IPC Counter 2013-04-11 16:03:22 -04:00
norm_desc.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
ring_mode.c net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp 2014-01-19 20:02:45 -08:00
stmmac.h net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's 2014-01-19 20:02:41 -08:00
stmmac_ethtool.c stmmac: add the support for PTP hw clock driver 2013-03-26 12:53:37 -04:00
stmmac_hwtstamp.c driver:stmmac: Adjust time stamp increase for 0.465 ns accurate only when Time stamp binary rollover is set. 2013-09-04 14:37:02 -04:00
stmmac_main.c net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp 2014-01-19 20:02:45 -08:00
stmmac_mdio.c net: stmmac: make stmmac_mdio_reset non-static 2014-01-16 15:23:43 -08:00
stmmac_pci.c net: stmmac: Add support for optional reset control 2014-01-19 20:02:02 -08:00
stmmac_platform.c net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's 2014-01-19 20:02:41 -08:00
stmmac_ptp.c stmmac: Fix incorrect spinlock release and PTP cap detection. 2013-12-29 22:37:00 -05:00
stmmac_ptp.h stmmac: add IEEE PTPv1 and PTPv2 support. 2013-03-26 12:53:37 -04:00