Skip to content

Commit 9f37af6

Browse files
committed
uml: Pushdown the bkl from harddog_kern ioctl
Pushdown the bkl to harddog_ioctl. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Uml <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: John Kacur <[email protected]> Cc: Arnd Bergmann <[email protected]>
1 parent 9918ff2 commit 9f37af6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

arch/um/drivers/harddog_kern.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t
124124
return 0;
125125
}
126126

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)
129129
{
130130
void __user *argp= (void __user *)arg;
131131
static struct watchdog_info ident = {
@@ -148,10 +148,22 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
148148
}
149149
}
150150

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+
151163
static const struct file_operations harddog_fops = {
152164
.owner = THIS_MODULE,
153165
.write = harddog_write,
154-
.ioctl = harddog_ioctl,
166+
.unlocked_ioctl = harddog_ioctl,
155167
.open = harddog_open,
156168
.release = harddog_release,
157169
};

0 commit comments

Comments
 (0)