linux/drivers/net/ethernet/freescale
Philipp Zabel 81f35ffde0 net: fec: ptp: fix NULL pointer dereference if ptp_clock is not set
Since commit 278d240478 (net: fec: ptp: Enable PPS output based on ptp clock)
fec_enet_interrupt calls fec_ptp_check_pps_event unconditionally, which calls
into ptp_clock_event. If fep->ptp_clock is NULL, ptp_clock_event tries to
dereference the NULL pointer.
Since on i.MX53 fep->bufdesc_ex is not set, fec_ptp_init is never called,
and fep->ptp_clock is NULL, which reliably causes a kernel panic.

This patch adds a check for fep->ptp_clock == NULL in fec_enet_interrupt.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-22 17:48:06 -04:00
..
fs_enet net: fs_enet: set back promiscuity mode after restart 2014-10-22 15:33:13 -04:00
Kconfig net/fsl: xgmac_mdio is dependent on OF_MDIO 2014-06-11 15:50:59 -07:00
Makefile gianfar: Remove sysfs stubs for FIFOCFG and stashing 2014-02-18 15:03:02 -05:00
fec.h net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fec_main.c net: fec: ptp: fix NULL pointer dereference if ptp_clock is not set 2014-10-22 17:48:06 -04:00
fec_mpc52xx.c fec_mpc52xx: delete unneeded test before of_node_put 2014-08-08 10:28:08 -07:00
fec_mpc52xx.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
fec_mpc52xx_phy.c net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata() 2013-08-21 12:27:04 -07:00
fec_ptp.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fsl_pq_mdio.c net/fsl_pq_mdio: Replace spin_event_timeout() with arch independent 2014-10-09 01:40:37 -04:00
gianfar.c gianfar: Add FCS to rx buffer size (fix) 2014-10-15 16:53:50 -04:00
gianfar.h gianfar: Replace eieio with wmb for non-PPC archs 2014-10-09 01:40:37 -04:00
gianfar_ethtool.c gianfar: Check if phydev present on ethtool -A 2014-04-24 13:36:16 -04:00
gianfar_ptp.c ptp: drivers: set the number of programmable pins. 2014-03-21 14:21:14 -04:00
ucc_geth.c net: ucc_geth: fix build failure 2014-08-10 21:40:15 -07:00
ucc_geth.h net: remove skb recycling 2012-10-07 00:40:54 -04:00
ucc_geth_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
xgmac_mdio.c net/fsl: Add format length modifier to avoid negative values 2014-07-30 19:58:09 -07:00