Message ID | 20211117072433.GB5237@kili (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] dpaa2-eth: Fix use after free in dpaa2_eth_remove() | expand |
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 714e961e7a77..e82874119d38 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4552,8 +4552,6 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev) free_netdev(net_dev); - dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name); - return 0; }
This debug message dereferences "net_dev" but it was freed on the line before. Just delete it. Fixes: 7472dd9f6499 ("staging: fsl-dpaa2/eth: Move print message") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 -- 1 file changed, 2 deletions(-)