[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200226121750.40925-1-yangerkun@huawei.com>
Date: Wed, 26 Feb 2020 20:17:50 +0800
From: yangerkun <yangerkun@...wei.com>
To: <davem@...emloft.net>, <socketcan@...tkopp.net>
CC: <netdev@...r.kernel.org>, <maowenan@...wei.com>,
<yangerkun@...wei.com>
Subject: [PATCH v3] 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 <yangerkun@...wei.com>
Reviewed-by: Oliver Hartkopp <socketcan@...tkopp.net>
---
drivers/net/slip/slip.c | 2 ++
1 file changed, 2 insertions(+)
v2->v3:
delete comment exist in v2
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 6f4d7ba8b109..0d2d8c78635e 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -863,7 +863,9 @@ static int slip_open(struct tty_struct *tty)
tty->disc_data = NULL;
clear_bit(SLF_INUSE, &sl->flags);
sl_free_netdev(sl->dev);
+ rtnl_unlock();
free_netdev(sl->dev);
+ return err;
err_exit:
rtnl_unlock();
--
2.23.0.rc2.8.gff66981f45
Powered by blists - more mailing lists