[BLUETOOTH] lockdep: annotate sk_lock nesting in AF_BLUETOOTH
[linux-drm-fsl-dcu.git] / net / bluetooth / l2cap.c
index bbf78e6a7bc382d8a6014b1d076c784fbd2a2339..29a8fa4d3728bf7e097fd713007e988b1413b2aa 100644 (file)
@@ -770,7 +770,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
        long timeo;
        int err = 0;
 
-       lock_sock(sk);
+       lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
 
        if (sk->sk_state != BT_LISTEN) {
                err = -EBADFD;
@@ -792,7 +792,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
 
                release_sock(sk);
                timeo = schedule_timeout(timeo);
-               lock_sock(sk);
+               lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
 
                if (sk->sk_state != BT_LISTEN) {
                        err = -EBADFD;