]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sfc: check for NULL efx->ptp_data in efx_ptp_event
authorEdward Cree <ecree@solarflare.com>
Tue, 25 Feb 2014 13:17:59 +0000 (13:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:44:00 +0000 (21:44 -0700)
commit4de185063bc4585ef3b56775ec0f8057031f8cd5
tree654d88265416c687acd3ebbb50dee95ff914e1bb
parent503f0b1c00d9d399701571c056fde026339b0be8
sfc: check for NULL efx->ptp_data in efx_ptp_event

[ Upstream commit 8f355e5cee63c2c0c145d8206c4245d0189f47ff ]

If we receive a PTP event from the NIC when we haven't set up PTP state
in the driver, we attempt to read through a NULL pointer efx->ptp_data,
triggering a panic.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Acked-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/ptp.c