[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1426093216-18370-1-git-send-email-george.joseph@fairview5.com>
Date: Wed, 11 Mar 2015 11:00:15 -0600
From: George Joseph <george.joseph@...rview5.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Nimrod Andy <B38611@...escale.com>,
Russell King <rmk+kernel@....linux.org.uk>,
Frank Li <Frank.Li@...escale.com>,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH 1/1] net: fec: fix oops after transmit queue timeout
When a transmit queue timeout happens, dev_watchdog calls fec_timeout
which in turns schedules fec_enet_timeout_work. fec_enet_timeout_work
uses container_of to get the private data structure (fep) then tries to
use fep->netdev. Unfortunately, nobody ever set fep->netdev so the result
is a NULL pointer oops.
With fep->netdev set right after fep is allocated in fep_probe, the
drivers recovers nicely after the tx queue timeout.
Signed-off-by: George Joseph <george.joseph@...rview5.com>
Tested-by: George Joseph <george.joseph@...rview5.com>
---
drivers/net/ethernet/freescale/fec_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 3dca494..f6392ad 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3161,6 +3161,7 @@ fec_probe(struct platform_device *pdev)
/* setup board info structure */
fep = netdev_priv(ndev);
+ fep->netdev = ndev;
fep->num_rx_queues = num_rx_qs;
fep->num_tx_queues = num_tx_qs;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists