aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/sco.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r--net/bluetooth/sco.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 3f5163e725ed..65b6fb1c4154 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -414,11 +414,11 @@ static struct proto sco_proto = {
414 .obj_size = sizeof(struct sco_pinfo) 414 .obj_size = sizeof(struct sco_pinfo)
415}; 415};
416 416
417static struct sock *sco_sock_alloc(struct socket *sock, int proto, gfp_t prio) 417static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, int proto, gfp_t prio)
418{ 418{
419 struct sock *sk; 419 struct sock *sk;
420 420
421 sk = sk_alloc(PF_BLUETOOTH, prio, &sco_proto, 1); 421 sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto, 1);
422 if (!sk) 422 if (!sk)
423 return NULL; 423 return NULL;
424 424
@@ -439,7 +439,7 @@ static struct sock *sco_sock_alloc(struct socket *sock, int proto, gfp_t prio)
439 return sk; 439 return sk;
440} 440}
441 441
442static int sco_sock_create(struct socket *sock, int protocol) 442static int sco_sock_create(struct net *net, struct socket *sock, int protocol)
443{ 443{
444 struct sock *sk; 444 struct sock *sk;
445 445
@@ -452,7 +452,7 @@ static int sco_sock_create(struct socket *sock, int protocol)
452 452
453 sock->ops = &sco_sock_ops; 453 sock->ops = &sco_sock_ops;
454 454
455 sk = sco_sock_alloc(sock, protocol, GFP_ATOMIC); 455 sk = sco_sock_alloc(net, sock, protocol, GFP_ATOMIC);
456 if (!sk) 456 if (!sk)
457 return -ENOMEM; 457 return -ENOMEM;
458 458
@@ -807,7 +807,7 @@ static void sco_conn_ready(struct sco_conn *conn)
807 807
808 bh_lock_sock(parent); 808 bh_lock_sock(parent);
809 809
810 sk = sco_sock_alloc(NULL, BTPROTO_SCO, GFP_ATOMIC); 810 sk = sco_sock_alloc(parent->sk_net, NULL, BTPROTO_SCO, GFP_ATOMIC);
811 if (!sk) { 811 if (!sk) {
812 bh_unlock_sock(parent); 812 bh_unlock_sock(parent);
813 goto done; 813 goto done;