Removes the BKL in x25 setsock and getsockopts.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
struct sock *sk = sock->sk;
int rc = -ENOPROTOOPT;
- lock_kernel();
if (level != SOL_X25 || optname != X25_QBITINCL)
goto out;
clear_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags);
rc = 0;
out:
- unlock_kernel();
return rc;
}
struct sock *sk = sock->sk;
int val, len, rc = -ENOPROTOOPT;
- lock_kernel();
if (level != SOL_X25 || optname != X25_QBITINCL)
goto out;
val = test_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags);
rc = copy_to_user(optval, &val, len) ? -EFAULT : 0;
out:
- unlock_kernel();
return rc;
}