aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-05-06 19:41:48 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-06-27 01:31:52 -0400
commit3e3cda96d014b69f7723d1d4507897e5be6aceb7 (patch)
tree7ff77f9cd865ccedfa849840fb38bd6c649ccdee /drivers
parentc81ec80bc86f4eacd5f48229c1de623865acbb92 (diff)
Hold RTNL while calling dev_close()
dev_close() must be called holding the RTNL. Compile-tested only. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wan/x25_asy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 249e18053d5..069f8bb0a99 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -32,6 +32,7 @@
#include <linux/x25.h>
#include <linux/lapb.h>
#include <linux/init.h>
+#include <linux/rtnetlink.h>
#include "x25_asy.h"
#include <net/x25device.h>
@@ -601,8 +602,10 @@ static void x25_asy_close_tty(struct tty_struct *tty)
if (!sl || sl->magic != X25_ASY_MAGIC)
return;
+ rtnl_lock();
if (sl->dev->flags & IFF_UP)
dev_close(sl->dev);
+ rtnl_unlock();
tty->disc_data = NULL;
sl->tty = NULL;