summaryrefslogtreecommitdiff
path: root/drivers/mtd/sm_ftl.c
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2021-08-04 18:51:51 +0300
committerJakub Kicinski <kuba@kernel.org>2021-08-05 07:29:49 -0700
commit44712965bf12ae1758cec4de53816ed4b914ca1a (patch)
tree18e6a326e54544210ed88dafa79cd77e1546e27c /drivers/mtd/sm_ftl.c
parentaf35fc37354cda3c9c8cc4961b1d24bdc9d27903 (diff)
net: fec: fix use-after-free in fec_drv_remove
Smatch says: drivers/net/ethernet/freescale/fec_main.c:3994 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev); drivers/net/ethernet/freescale/fec_main.c:3995 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev); Since fep pointer is netdev private data, accessing it after free_netdev() call can cause use-after-free bug. Fix it by moving free_netdev() call at the end of the function Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: a31eda65ba21 ("net: fec: fix clock count mis-match") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Reviewed-by: Joakim Zhang <qiangqing.zhang@nxp.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/mtd/sm_ftl.c')
0 files changed, 0 insertions, 0 deletions