提交 866988ed 编写于 作者: A Alan Cox 提交者: David S. Miller

wanrouter: Push down BKL

Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f3ff8a4d
...@@ -350,9 +350,9 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) ...@@ -350,9 +350,9 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
* o execute requested action or pass command to the device driver * o execute requested action or pass command to the device driver
*/ */
int wanrouter_ioctl(struct inode *inode, struct file *file, long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{ {
struct inode *inode = file->f_path.dentry->d_inode;
int err = 0; int err = 0;
struct proc_dir_entry *dent; struct proc_dir_entry *dent;
struct wan_device *wandev; struct wan_device *wandev;
...@@ -372,6 +372,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, ...@@ -372,6 +372,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file,
if (wandev->magic != ROUTER_MAGIC) if (wandev->magic != ROUTER_MAGIC)
return -EINVAL; return -EINVAL;
lock_kernel();
switch (cmd) { switch (cmd) {
case ROUTER_SETUP: case ROUTER_SETUP:
err = wanrouter_device_setup(wandev, data); err = wanrouter_device_setup(wandev, data);
...@@ -403,6 +404,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, ...@@ -403,6 +404,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file,
err = wandev->ioctl(wandev, cmd, arg); err = wandev->ioctl(wandev, cmd, arg);
else err = -EINVAL; else err = -EINVAL;
} }
unlock_kernel();
return err; return err;
} }
......
...@@ -278,7 +278,7 @@ static const struct file_operations wandev_fops = { ...@@ -278,7 +278,7 @@ static const struct file_operations wandev_fops = {
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release,
.ioctl = wanrouter_ioctl, .unlocked_ioctl = wanrouter_ioctl,
}; };
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册