Commit 1c9bfd4a authored by David Woodhouse's avatar David Woodhouse Committed by Hideaki Yoshifuji

[BLUETOOTH]: Fix bug in set_sk_owner() changes.

parent c7903bf6
......@@ -130,7 +130,6 @@ struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio
}
sock_init_data(sock, sk);
sk_set_owner(sk, THIS_MODULE);
INIT_LIST_HEAD(&bt_sk(sk)->accept_q);
sk->sk_zapped = 0;
......
......@@ -175,6 +175,9 @@ static int bnep_sock_create(struct socket *sock, int protocol)
if (!(sk = bt_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL)))
return -ENOMEM;
sk_set_owner(sk, THIS_MODULE);
sock->ops = &bnep_sock_ops;
sock->state = SS_UNCONNECTED;
......
......@@ -587,6 +587,8 @@ static int hci_sock_create(struct socket *sock, int protocol)
if (!sk)
return -ENOMEM;
sk_set_owner(sk, THIS_MODULE);
sock->state = SS_UNCONNECTED;
sk->sk_state = BT_OPEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment