diff options
Diffstat (limited to 'net/econet')
-rw-r--r-- | net/econet/af_econet.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 35c96bcc0f3..a2429dbcb86 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -608,12 +608,15 @@ static struct proto econet_proto = { | |||
608 | * Create an Econet socket | 608 | * Create an Econet socket |
609 | */ | 609 | */ |
610 | 610 | ||
611 | static int econet_create(struct socket *sock, int protocol) | 611 | static int econet_create(struct net *net, struct socket *sock, int protocol) |
612 | { | 612 | { |
613 | struct sock *sk; | 613 | struct sock *sk; |
614 | struct econet_sock *eo; | 614 | struct econet_sock *eo; |
615 | int err; | 615 | int err; |
616 | 616 | ||
617 | if (net != &init_net) | ||
618 | return -EAFNOSUPPORT; | ||
619 | |||
617 | /* Econet only provides datagram services. */ | 620 | /* Econet only provides datagram services. */ |
618 | if (sock->type != SOCK_DGRAM) | 621 | if (sock->type != SOCK_DGRAM) |
619 | return -ESOCKTNOSUPPORT; | 622 | return -ESOCKTNOSUPPORT; |
@@ -621,7 +624,7 @@ static int econet_create(struct socket *sock, int protocol) | |||
621 | sock->state = SS_UNCONNECTED; | 624 | sock->state = SS_UNCONNECTED; |
622 | 625 | ||
623 | err = -ENOBUFS; | 626 | err = -ENOBUFS; |
624 | sk = sk_alloc(PF_ECONET, GFP_KERNEL, &econet_proto, 1); | 627 | sk = sk_alloc(net, PF_ECONET, GFP_KERNEL, &econet_proto, 1); |
625 | if (sk == NULL) | 628 | if (sk == NULL) |
626 | goto out; | 629 | goto out; |
627 | 630 | ||