From: andrew hendry Date: Thu, 25 Nov 2010 02:18:45 +0000 (+0000) Subject: X25 remove bkl in call user data length ioctl X-Git-Tag: v2.6.38-rc1~476^2~436 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f0a069a1d5c0ccace735e3a62c1bcef53e4c354;p=platform%2Fkernel%2Flinux-3.10.git X25 remove bkl in call user data length ioctl Signed-off-by: Andrew Hendry Signed-off-by: David S. Miller --- diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 8cfc419..ad96ee9 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1562,19 +1562,20 @@ out_dtefac_release: 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; }