]> git.baikalelectronics.ru Git - kernel.git/commit
net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove
authorPavel Skripkin <paskripkin@gmail.com>
Tue, 16 Nov 2021 15:17:12 +0000 (18:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Nov 2021 14:47:07 +0000 (14:47 +0000)
commite31aebf03a5d4bbaea50916511dbd440b781d6a3
treec8bc5858cf317141d50e08ff17d1a3b3b58612f3
parent51e4be94cb94f69f483415621b4407f04e92d254
net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove

Access to netdev after free_netdev() will cause use-after-free bug.
Move debug log before free_netdev() call to avoid it.

Fixes: 26b115934b17 ("staging: fsl-dpaa2/eth: Move print message")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c