提交 74a7e440 编写于 作者: A andrew hendry 提交者: David S. Miller

X25 remove bkl from causediag ioctls

Signed-off-by: NAndrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5b7958df
......@@ -1538,23 +1538,22 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
case SIOCX25GCAUSEDIAG: {
struct x25_causediag causediag;
lock_kernel();
causediag = x25->causediag;
rc = copy_to_user(argp, &causediag,
sizeof(causediag)) ? -EFAULT : 0;
unlock_kernel();
lock_sock(sk);
rc = copy_to_user(argp, &x25->causediag,
sizeof(x25->causediag))
? -EFAULT : 0;
release_sock(sk);
break;
}
case SIOCX25SCAUSEDIAG: {
struct x25_causediag causediag;
rc = -EFAULT;
lock_kernel();
if (copy_from_user(&causediag, argp, sizeof(causediag)))
break;
lock_sock(sk);
x25->causediag = causediag;
unlock_kernel();
release_sock(sk);
rc = 0;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册