From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 20 May 2008 17:16:24 +0000 (+0200)
Subject: net-tun: BKL pushdown
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd3e05b6c82ebee06f888482975172028e89382d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

net-tun: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0ce07a339c7e..ce5af2aa8843 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -48,6 +48,7 @@
 #include <linux/kernel.h>
 #include <linux/major.h>
 #include <linux/slab.h>
+#include <linux/smp_lock.h>
 #include <linux/poll.h>
 #include <linux/fcntl.h>
 #include <linux/init.h>
@@ -797,6 +798,7 @@ static int tun_chr_fasync(int fd, struct file *file, int on)
 
 static int tun_chr_open(struct inode *inode, struct file * file)
 {
+	cycle_kernel_lock();
 	DBG1(KERN_INFO "tunX: tun_chr_open\n");
 	file->private_data = NULL;
 	return 0;