slip: not call free_netdev before rtnl_unlock in slip_open
Subsystems (2)
PATCH v2 1/1 slip: not call free_netdev before rtnl_unlock in slip_open
As the description before netdev_run_todo, we cannot call free_netdev before rtnl_unlock, fix it by reorder the code.
Signed-off-by yangerkun <[email protected]>
Reviewed-by Oliver Hartkopp <[email protected]>
--- drivers/net/slip/slip.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/slip/slip.c +3 -0
@@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty) tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags);sl_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.23.0.rc2.8.gff66981f45
David Miller
maintainerFrom: yangerkun <[email protected]>
Date: Wed, 26 Feb 2020 11:54:35 +0800
Quoted 5 lines
As the description before
netdev_run_todo, we cannot callfree_netdevbeforertnl_unlock, fix it by reorder the code.Signed-off-by yangerkun <[email protected]>Reviewed-by Oliver Hartkopp <[email protected]>
Applied and queued up for -stable, thank you.