From: Hubert Feurstein <h.feurstein@gmail.com>
To: netdev@vger.kernel.org
Cc: fabio.estevam@freescale.com, frank.li@freescale.com,
linux-kernel@vger.kernel.org, davem@davemloft.net,
Hubert Feurstein <h.feurstein@gmail.com>
Subject: [PATCH] net: fec: fix NULL pointer dereference in fec_enet_timeout_work
Date: Wed, 7 Jan 2015 14:48:17 +0100 [thread overview]
Message-ID: <1420638497-6871-1-git-send-email-hubert.feurstein@deto.at> (raw)
From: Hubert Feurstein <h.feurstein@gmail.com>
This patch initialises the fep->netdev pointer. This pointer was not
initialised at all, but is used in fec_enet_timeout_work and in some
error paths.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.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 5ebdf8d..dbcab1c 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3129,6 +3129,7 @@ fec_probe(struct platform_device *pdev)
pdev->id_entry = of_id->data;
fep->quirks = pdev->id_entry->driver_data;
+ fep->netdev = ndev;
fep->num_rx_queues = num_rx_qs;
fep->num_tx_queues = num_tx_qs;
--
2.2.1
next reply other threads:[~2015-01-07 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 13:48 Hubert Feurstein [this message]
2015-01-09 4:12 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420638497-6871-1-git-send-email-hubert.feurstein@deto.at \
--to=h.feurstein@gmail.com \
--cc=davem@davemloft.net \
--cc=fabio.estevam@freescale.com \
--cc=frank.li@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®