diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-11-24 21:18:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 14:12:21 -0500 |
commit | 5b7958dfa5db758e36e92e1790075b470b4947f8 (patch) | |
tree | 6080bf03615fb3b95a7d0e7221f31e8c15e638aa /net/x25 | |
parent | f90de660678cf553f63c387945830a2e4d26dd3e (diff) |
X25 remove bkl from calluserdata ioctls
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 2518efae8ec..e2eea0aec46 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1512,11 +1512,11 @@ out_dtefac_release: | |||
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | case SIOCX25GCALLUSERDATA: { | 1514 | case SIOCX25GCALLUSERDATA: { |
1515 | struct x25_calluserdata cud = x25->calluserdata; | 1515 | lock_sock(sk); |
1516 | lock_kernel(); | 1516 | rc = copy_to_user(argp, &x25->calluserdata, |
1517 | rc = copy_to_user(argp, &cud, | 1517 | sizeof(x25->calluserdata)) |
1518 | sizeof(cud)) ? -EFAULT : 0; | 1518 | ? -EFAULT : 0; |
1519 | unlock_kernel(); | 1519 | release_sock(sk); |
1520 | break; | 1520 | break; |
1521 | } | 1521 | } |
1522 | 1522 | ||
@@ -1524,15 +1524,15 @@ out_dtefac_release: | |||
1524 | struct x25_calluserdata calluserdata; | 1524 | struct x25_calluserdata calluserdata; |
1525 | 1525 | ||
1526 | rc = -EFAULT; | 1526 | rc = -EFAULT; |
1527 | lock_kernel(); | ||
1528 | if (copy_from_user(&calluserdata, argp, | 1527 | if (copy_from_user(&calluserdata, argp, |
1529 | sizeof(calluserdata))) | 1528 | sizeof(calluserdata))) |
1530 | break; | 1529 | break; |
1531 | rc = -EINVAL; | 1530 | rc = -EINVAL; |
1532 | if (calluserdata.cudlength > X25_MAX_CUD_LEN) | 1531 | if (calluserdata.cudlength > X25_MAX_CUD_LEN) |
1533 | break; | 1532 | break; |
1533 | lock_sock(sk); | ||
1534 | x25->calluserdata = calluserdata; | 1534 | x25->calluserdata = calluserdata; |
1535 | unlock_kernel(); | 1535 | release_sock(sk); |
1536 | rc = 0; | 1536 | rc = 0; |
1537 | break; | 1537 | break; |
1538 | } | 1538 | } |