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>
This commit is contained in:
parent
9918ff26b3
commit
9f37af654f
|
@ -124,7 +124,7 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int harddog_ioctl(struct inode *inode, struct file *file,
|
static int harddog_ioctl_unlocked(struct file *file,
|
||||||
unsigned int cmd, unsigned long arg)
|
unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
void __user *argp= (void __user *)arg;
|
void __user *argp= (void __user *)arg;
|
||||||
|
@ -148,10 +148,22 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static long harddog_ioctl(struct file *file,
|
||||||
|
unsigned int cmd, unsigned long arg)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
|
ret = harddog_ioctl_unlocked(file, cmd, arg);
|
||||||
|
unlock_kernel();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct file_operations harddog_fops = {
|
static const struct file_operations harddog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = harddog_write,
|
.write = harddog_write,
|
||||||
.ioctl = harddog_ioctl,
|
.unlocked_ioctl = harddog_ioctl,
|
||||||
.open = harddog_open,
|
.open = harddog_open,
|
||||||
.release = harddog_release,
|
.release = harddog_release,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue