slcan: not call free_netdev before rtnl_unlock in slcan_open
Subsystems (3)
PATCH 1/1 slcan: not call free_netdev before rtnl_unlock in slcan_open
As the description before netdev_run_todo, we cannot call free_netdev before rtnl_unlock, fix it by reorder the code.
This patch is a 1:1 copy of upstream slip.c commit f596c87005f7 ("slip: not call free_netdev before rtnl_unlock in slip_open").
Reported-by yangerkun <[email protected]>
Signed-off-by Oliver Hartkopp <[email protected]>
--- drivers/net/can/slcan.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/can/slcan.c +3 -0
@@ -625,7 +625,10 @@ static int slcan_open(struct tty_struct *tty) tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags);slc_free_netdev (sl->dev); +/* do not call free_netdev before rtnl_unlock */ +rtnl_unlock ();free_netdev (sl->dev); +return err; err_exit:rtnl_unlock ();
Signature · 1 line
2.20.1
From: Oliver Hartkopp <[email protected]>
Date: Sat, 21 Mar 2020 14:08:29 +0100
Quoted 8 lines
As the description before
netdev_run_todo, we cannot callfree_netdevbeforertnl_unlock, fix it by reorder the code.This patch is a 1:1 copy of upstream
slip.ccommitf596c87005f7("slip: not callfree_netdevbeforertnl_unlockinslip_open").Reported-by yangerkun <[email protected]>Signed-off-by Oliver Hartkopp <[email protected]>
Applied, thanks Oliver.