Patch "net: freescale: fix potential null pointer dereference" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
net: freescale: fix potential null pointer dereference
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-freescale-fix-potential-null-pointer-dereference.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Apr 10 10:31:53 CEST 2018
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 30 May 2017 17:38:43 -0500
Subject: net: freescale: fix potential null pointer dereference
From: "Gustavo A. R. Silva" <[email protected]>
[ Upstream commit 06d2d6431bc8d41ef5ffd8bd4b52cea9f72aed22 ]
Add NULL check before dereferencing pointer _id_ in order to avoid a potential NULL pointer dereference.
Addresses-Coverity-ID: 1397995
--- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/fsl_pq_mdio.c +8 -1
@@ -382,7 +382,7 @@ static int fsl_pq_mdio_probe(struct plat {const struct of_device_id *id =of_match_device (fsl_pq_mdio_match, &pdev->dev); -const struct fsl_pq_mdio_data *data = id->data; +const struct fsl_pq_mdio_data *data;struct device_node *np = pdev->dev.of_node;struct resource res;struct device_node *tbi;
@@ -390,6 +390,13 @@ static int fsl_pq_mdio_probe(struct platstruct mii_bus *new_bus;int err; +if (!id) { +dev_err (&pdev->dev,"Failed to match device\n" ); +return -ENODEV ; + } + + data = id->data; +dev_dbg (&pdev->dev,"found %s compatible node\n" , id->compatible); new_bus =mdiobus_alloc_size (sizeof (*priv));
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/net-freescale-fix-potential-null-pointer-dereference.patch