diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4fdfa2ae5418..9c59a82784dc 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
45 | #include <linux/major.h> | 45 | #include <linux/major.h> |
46 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
47 | #include <linux/smp_lock.h> | ||
48 | #include <linux/poll.h> | 47 | #include <linux/poll.h> |
49 | #include <linux/fcntl.h> | 48 | #include <linux/fcntl.h> |
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
@@ -1285,7 +1284,6 @@ static int tun_chr_fasync(int fd, struct file *file, int on) | |||
1285 | 1284 | ||
1286 | DBG(KERN_INFO "%s: tun_chr_fasync %d\n", tun->dev->name, on); | 1285 | DBG(KERN_INFO "%s: tun_chr_fasync %d\n", tun->dev->name, on); |
1287 | 1286 | ||
1288 | lock_kernel(); | ||
1289 | if ((ret = fasync_helper(fd, file, on, &tun->fasync)) < 0) | 1287 | if ((ret = fasync_helper(fd, file, on, &tun->fasync)) < 0) |
1290 | goto out; | 1288 | goto out; |
1291 | 1289 | ||
@@ -1298,7 +1296,6 @@ static int tun_chr_fasync(int fd, struct file *file, int on) | |||
1298 | tun->flags &= ~TUN_FASYNC; | 1296 | tun->flags &= ~TUN_FASYNC; |
1299 | ret = 0; | 1297 | ret = 0; |
1300 | out: | 1298 | out: |
1301 | unlock_kernel(); | ||
1302 | tun_put(tun); | 1299 | tun_put(tun); |
1303 | return ret; | 1300 | return ret; |
1304 | } | 1301 | } |
@@ -1306,7 +1303,7 @@ out: | |||
1306 | static int tun_chr_open(struct inode *inode, struct file * file) | 1303 | static int tun_chr_open(struct inode *inode, struct file * file) |
1307 | { | 1304 | { |
1308 | struct tun_file *tfile; | 1305 | struct tun_file *tfile; |
1309 | cycle_kernel_lock(); | 1306 | |
1310 | DBG1(KERN_INFO "tunX: tun_chr_open\n"); | 1307 | DBG1(KERN_INFO "tunX: tun_chr_open\n"); |
1311 | 1308 | ||
1312 | tfile = kmalloc(sizeof(*tfile), GFP_KERNEL); | 1309 | tfile = kmalloc(sizeof(*tfile), GFP_KERNEL); |