diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-11-25 03:18:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 20:12:21 +0100 |
commit | 5b7958dfa5db758e36e92e1790075b470b4947f8 (patch) | |
tree | 6080bf03615fb3b95a7d0e7221f31e8c15e638aa /net/x25/af_x25.c | |
parent | X25 remove bkl in facility ioctls (diff) | |
download | linux-5b7958dfa5db758e36e92e1790075b470b4947f8.tar.xz linux-5b7958dfa5db758e36e92e1790075b470b4947f8.zip |
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/af_x25.c')
-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 2518efae8ec9..e2eea0aec466 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1512,11 +1512,11 @@ out_dtefac_release: } case SIOCX25GCALLUSERDATA: { - struct x25_calluserdata cud = x25->calluserdata; - lock_kernel(); - rc = copy_to_user(argp, &cud, - sizeof(cud)) ? -EFAULT : 0; - unlock_kernel(); + lock_sock(sk); + rc = copy_to_user(argp, &x25->calluserdata, + sizeof(x25->calluserdata)) + ? -EFAULT : 0; + release_sock(sk); break; } @@ -1524,15 +1524,15 @@ out_dtefac_release: struct x25_calluserdata calluserdata; rc = -EFAULT; - lock_kernel(); if (copy_from_user(&calluserdata, argp, sizeof(calluserdata))) break; rc = -EINVAL; if (calluserdata.cudlength > X25_MAX_CUD_LEN) break; + lock_sock(sk); x25->calluserdata = calluserdata; - unlock_kernel(); + release_sock(sk); rc = 0; break; } |