Commit 9f37af654fda88a8dcca74c785f6c20e52758866
1 parent
9918ff26b3
Exists in
master
and in
7 other branches
uml: Pushdown the bkl from harddog_kern ioctl
Pushdown the bkl to harddog_ioctl. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Uml <user-mode-linux-devel@lists.sourceforge.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de>
Showing 1 changed file with 15 additions and 3 deletions Side-by-side Diff
arch/um/drivers/harddog_kern.c
... | ... | @@ -124,8 +124,8 @@ |
124 | 124 | return 0; |
125 | 125 | } |
126 | 126 | |
127 | -static int harddog_ioctl(struct inode *inode, struct file *file, | |
128 | - unsigned int cmd, unsigned long arg) | |
127 | +static int harddog_ioctl_unlocked(struct file *file, | |
128 | + unsigned int cmd, unsigned long arg) | |
129 | 129 | { |
130 | 130 | void __user *argp= (void __user *)arg; |
131 | 131 | static struct watchdog_info ident = { |
132 | 132 | |
... | ... | @@ -148,10 +148,22 @@ |
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
151 | +static long harddog_ioctl(struct file *file, | |
152 | + unsigned int cmd, unsigned long arg) | |
153 | +{ | |
154 | + long ret; | |
155 | + | |
156 | + lock_kernel(); | |
157 | + ret = harddog_ioctl_unlocked(file, cmd, arg); | |
158 | + unlock_kernel(); | |
159 | + | |
160 | + return ret; | |
161 | +} | |
162 | + | |
151 | 163 | static const struct file_operations harddog_fops = { |
152 | 164 | .owner = THIS_MODULE, |
153 | 165 | .write = harddog_write, |
154 | - .ioctl = harddog_ioctl, | |
166 | + .unlocked_ioctl = harddog_ioctl, | |
155 | 167 | .open = harddog_open, |
156 | 168 | .release = harddog_release, |
157 | 169 | }; |