diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-10-22 18:34:35 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-23 01:48:06 +0400 |
commit | 81f35ffde0e95ee18de83646bbf93dda55d9cc8b (patch) | |
tree | 418229836e8c17ee9085243e4797b8f61fdfad84 /drivers/net/ethernet/amd | |
parent | 9e7ceb060754f134231f68cb29d5db31419fe1ed (diff) | |
download | linux-81f35ffde0e95ee18de83646bbf93dda55d9cc8b.tar.xz |
net: fec: ptp: fix NULL pointer dereference if ptp_clock is not set
Since commit 278d24047891 (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>
Diffstat (limited to 'drivers/net/ethernet/amd')
0 files changed, 0 insertions, 0 deletions