diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-11-24 21:18:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 14:12:22 -0500 |
commit | 3f0a069a1d5c0ccace735e3a62c1bcef53e4c354 (patch) | |
tree | 13d1f2bcaf11cb933d35eee19de3d90dc82b5833 /net/x25 | |
parent | 74a7e440807d34e586e9feb8e14851b5c80fbfe5 (diff) |
X25 remove bkl in call user data length ioctl
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25')
-rw-r--r-- | net/x25/af_x25.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 8cfc419cef4b..ad96ee90fe27 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1562,19 +1562,20 @@ out_dtefac_release: | |||
1562 | case SIOCX25SCUDMATCHLEN: { | 1562 | case SIOCX25SCUDMATCHLEN: { |
1563 | struct x25_subaddr sub_addr; | 1563 | struct x25_subaddr sub_addr; |
1564 | rc = -EINVAL; | 1564 | rc = -EINVAL; |
1565 | lock_kernel(); | 1565 | lock_sock(sk); |
1566 | if(sk->sk_state != TCP_CLOSE) | 1566 | if(sk->sk_state != TCP_CLOSE) |
1567 | break; | 1567 | goto out_cud_release; |
1568 | rc = -EFAULT; | 1568 | rc = -EFAULT; |
1569 | if (copy_from_user(&sub_addr, argp, | 1569 | if (copy_from_user(&sub_addr, argp, |
1570 | sizeof(sub_addr))) | 1570 | sizeof(sub_addr))) |
1571 | break; | 1571 | goto out_cud_release; |
1572 | rc = -EINVAL; | 1572 | rc = -EINVAL; |
1573 | if(sub_addr.cudmatchlength > X25_MAX_CUD_LEN) | 1573 | if(sub_addr.cudmatchlength > X25_MAX_CUD_LEN) |
1574 | break; | 1574 | goto out_cud_release; |
1575 | x25->cudmatchlength = sub_addr.cudmatchlength; | 1575 | x25->cudmatchlength = sub_addr.cudmatchlength; |
1576 | unlock_kernel(); | ||
1577 | rc = 0; | 1576 | rc = 0; |
1577 | out_cud_release: | ||
1578 | release_sock(sk); | ||
1578 | break; | 1579 | break; |
1579 | } | 1580 | } |
1580 | 1581 | ||