aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/socket.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-05-08 22:09:13 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-11 10:50:17 -0400
commit11aa9c28b4209242a9de0a661a7b3405adb568a0 (patch)
treed0dda021d89c17c54d54d227269f937d2d73b542 /drivers/isdn/mISDN/socket.c
parenteeb1bd5c40edb0e2fd925c8535e2fdebdbc5cef2 (diff)
net: Pass kern from net_proto_family.create to sk_alloc
In preparation for changing how struct net is refcounted on kernel sockets pass the knowledge that we are creating a kernel socket from sock_create_kern through to sk_alloc. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN/socket.c')
-rw-r--r--drivers/isdn/mISDN/socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 8dc7290089bb..0d29b5a6356d 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -601,14 +601,14 @@ static const struct proto_ops data_sock_ops = {
601}; 601};
602 602
603static int 603static int
604data_sock_create(struct net *net, struct socket *sock, int protocol) 604data_sock_create(struct net *net, struct socket *sock, int protocol, int kern)
605{ 605{
606 struct sock *sk; 606 struct sock *sk;
607 607
608 if (sock->type != SOCK_DGRAM) 608 if (sock->type != SOCK_DGRAM)
609 return -ESOCKTNOSUPPORT; 609 return -ESOCKTNOSUPPORT;
610 610
611 sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto); 611 sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto, kern);
612 if (!sk) 612 if (!sk)
613 return -ENOMEM; 613 return -ENOMEM;
614 614
@@ -756,14 +756,14 @@ static const struct proto_ops base_sock_ops = {
756 756
757 757
758static int 758static int
759base_sock_create(struct net *net, struct socket *sock, int protocol) 759base_sock_create(struct net *net, struct socket *sock, int protocol, int kern)
760{ 760{
761 struct sock *sk; 761 struct sock *sk;
762 762
763 if (sock->type != SOCK_RAW) 763 if (sock->type != SOCK_RAW)
764 return -ESOCKTNOSUPPORT; 764 return -ESOCKTNOSUPPORT;
765 765
766 sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto); 766 sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto, kern);
767 if (!sk) 767 if (!sk)
768 return -ENOMEM; 768 return -ENOMEM;
769 769
@@ -785,7 +785,7 @@ mISDN_sock_create(struct net *net, struct socket *sock, int proto, int kern)
785 785
786 switch (proto) { 786 switch (proto) {
787 case ISDN_P_BASE: 787 case ISDN_P_BASE:
788 err = base_sock_create(net, sock, proto); 788 err = base_sock_create(net, sock, proto, kern);
789 break; 789 break;
790 case ISDN_P_TE_S0: 790 case ISDN_P_TE_S0:
791 case ISDN_P_NT_S0: 791 case ISDN_P_NT_S0:
@@ -799,7 +799,7 @@ mISDN_sock_create(struct net *net, struct socket *sock, int proto, int kern)
799 case ISDN_P_B_L2DTMF: 799 case ISDN_P_B_L2DTMF:
800 case ISDN_P_B_L2DSP: 800 case ISDN_P_B_L2DSP:
801 case ISDN_P_B_L2DSPHDLC: 801 case ISDN_P_B_L2DSPHDLC:
802 err = data_sock_create(net, sock, proto); 802 err = data_sock_create(net, sock, proto, kern);
803 break; 803 break;
804 default: 804 default:
805 return err; 805 return err;