]> err.no Git - linux-2.6/blobdiff - net/rxrpc/af_rxrpc.c
Merge branches 'release' and 'hp-cid' into release
[linux-2.6] / net / rxrpc / af_rxrpc.c
index 122d55d992e121ab2f8b24bc0d2e1668f55aa59e..5e82f1c0afbbee2120f489447ae4b7092e7aed18 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/skbuff.h>
 #include <linux/poll.h>
 #include <linux/proc_fs.h>
+#include <linux/key-type.h>
 #include <net/net_namespace.h>
 #include <net/sock.h>
 #include <net/af_rxrpc.h>
@@ -64,7 +65,7 @@ static void rxrpc_write_space(struct sock *sk)
        if (rxrpc_writable(sk)) {
                if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
                        wake_up_interruptible(sk->sk_sleep);
-               sk_wake_async(sk, 2, POLL_OUT);
+               sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT);
        }
        read_unlock(&sk->sk_callback_lock);
 }
@@ -606,13 +607,16 @@ static unsigned int rxrpc_poll(struct file *file, struct socket *sock,
 /*
  * create an RxRPC socket
  */
-static int rxrpc_create(struct socket *sock, int protocol)
+static int rxrpc_create(struct net *net, struct socket *sock, int protocol)
 {
        struct rxrpc_sock *rx;
        struct sock *sk;
 
        _enter("%p,%d", sock, protocol);
 
+       if (net != &init_net)
+               return -EAFNOSUPPORT;
+
        /* we support transport protocol UDP only */
        if (protocol != PF_INET)
                return -EPROTONOSUPPORT;
@@ -623,7 +627,7 @@ static int rxrpc_create(struct socket *sock, int protocol)
        sock->ops = &rxrpc_rpc_ops;
        sock->state = SS_UNCONNECTED;
 
-       sk = sk_alloc(PF_RXRPC, GFP_KERNEL, &rxrpc_proto, 1);
+       sk = sk_alloc(net, PF_RXRPC, GFP_KERNEL, &rxrpc_proto);
        if (!sk)
                return -ENOMEM;