Commit 3f0a069a authored by andrew hendry's avatar andrew hendry Committed by David S. Miller

X25 remove bkl in call user data length ioctl

Signed-off-by: default avatarAndrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 74a7e440
......@@ -1562,19 +1562,20 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCX25SCUDMATCHLEN: {
struct x25_subaddr sub_addr;
rc = -EINVAL;
lock_kernel();
lock_sock(sk);
if(sk->sk_state != TCP_CLOSE)
break;
goto out_cud_release;
rc = -EFAULT;
if (copy_from_user(&sub_addr, argp,
sizeof(sub_addr)))
break;
goto out_cud_release;
rc = -EINVAL;
if(sub_addr.cudmatchlength > X25_MAX_CUD_LEN)
break;
goto out_cud_release;
x25->cudmatchlength = sub_addr.cudmatchlength;
unlock_kernel();
rc = 0;
out_cud_release:
release_sock(sk);
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment