diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-19 09:08:17 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-22 11:44:21 -0400 |
commit | 9f37af654fda88a8dcca74c785f6c20e52758866 (patch) | |
tree | e9a461031d9b8dffdeb29d889daf6cf1be5e4041 /arch/um | |
parent | 9918ff26b301e9a57f25fb12b44a46ad0c1e8f8f (diff) |
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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/harddog_kern.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index d332503fa1be..cfcac1ff4cf2 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c | |||
@@ -124,8 +124,8 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t | |||
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | static int harddog_ioctl(struct inode *inode, struct file *file, | 127 | static int harddog_ioctl_unlocked(struct file *file, |
128 | unsigned int cmd, unsigned long arg) | 128 | unsigned int cmd, unsigned long arg) |
129 | { | 129 | { |
130 | void __user *argp= (void __user *)arg; | 130 | void __user *argp= (void __user *)arg; |
131 | static struct watchdog_info ident = { | 131 | static struct watchdog_info ident = { |
@@ -148,10 +148,22 @@ static int harddog_ioctl(struct inode *inode, struct file *file, | |||
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 | static const struct file_operations harddog_fops = { | 163 | static const struct file_operations harddog_fops = { |
152 | .owner = THIS_MODULE, | 164 | .owner = THIS_MODULE, |
153 | .write = harddog_write, | 165 | .write = harddog_write, |
154 | .ioctl = harddog_ioctl, | 166 | .unlocked_ioctl = harddog_ioctl, |
155 | .open = harddog_open, | 167 | .open = harddog_open, |
156 | .release = harddog_release, | 168 | .release = harddog_release, |
157 | }; | 169 | }; |