diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/x25/af_x25.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index e5c1e3298f8..5e86d4e97dc 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -453,7 +453,6 @@ static int x25_setsockopt(struct socket *sock, int level, int optname, | |||
453 | struct sock *sk = sock->sk; | 453 | struct sock *sk = sock->sk; |
454 | int rc = -ENOPROTOOPT; | 454 | int rc = -ENOPROTOOPT; |
455 | 455 | ||
456 | lock_kernel(); | ||
457 | if (level != SOL_X25 || optname != X25_QBITINCL) | 456 | if (level != SOL_X25 || optname != X25_QBITINCL) |
458 | goto out; | 457 | goto out; |
459 | 458 | ||
@@ -471,7 +470,6 @@ static int x25_setsockopt(struct socket *sock, int level, int optname, | |||
471 | clear_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags); | 470 | clear_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags); |
472 | rc = 0; | 471 | rc = 0; |
473 | out: | 472 | out: |
474 | unlock_kernel(); | ||
475 | return rc; | 473 | return rc; |
476 | } | 474 | } |
477 | 475 | ||
@@ -481,7 +479,6 @@ static int x25_getsockopt(struct socket *sock, int level, int optname, | |||
481 | struct sock *sk = sock->sk; | 479 | struct sock *sk = sock->sk; |
482 | int val, len, rc = -ENOPROTOOPT; | 480 | int val, len, rc = -ENOPROTOOPT; |
483 | 481 | ||
484 | lock_kernel(); | ||
485 | if (level != SOL_X25 || optname != X25_QBITINCL) | 482 | if (level != SOL_X25 || optname != X25_QBITINCL) |
486 | goto out; | 483 | goto out; |
487 | 484 | ||
@@ -502,7 +499,6 @@ static int x25_getsockopt(struct socket *sock, int level, int optname, | |||
502 | val = test_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags); | 499 | val = test_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags); |
503 | rc = copy_to_user(optval, &val, len) ? -EFAULT : 0; | 500 | rc = copy_to_user(optval, &val, len) ? -EFAULT : 0; |
504 | out: | 501 | out: |
505 | unlock_kernel(); | ||
506 | return rc; | 502 | return rc; |
507 | } | 503 | } |
508 | 504 | ||