]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/x25_asy.c
Hold RTNL while calling dev_close()
[linux-2.6-omap-h63xx.git] / drivers / net / wan / x25_asy.c
index 249e18053d5fa4a2d6e29a60e33878bbe1f78c90..069f8bb0a99fa401e254a03ff94a77a4217d58b5 100644 (file)
@@ -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;