Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / net / core / sock.c
index aa4a00d381e38c37f61db1a1f4a393c10f29cbec..d57b0cc995a0cea45d82bf73d8149aae9f7b2e17 100644 (file)
@@ -1039,6 +1039,10 @@ set_rcvbuf:
                }
                break;
 
+       case SO_DETACH_REUSEPORT_BPF:
+               ret = reuseport_detach_prog(sk);
+               break;
+
        case SO_DETACH_FILTER:
                ret = sk_detach_filter(sk);
                break;
@@ -1593,7 +1597,7 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
                sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO);
                if (!sk)
                        return sk;
-               if (priority & __GFP_ZERO)
+               if (want_init_on_alloc(priority))
                        sk_prot_clear_nulls(sk, prot->obj_size);
        } else
                sk = kmalloc(prot->obj_size, priority);
@@ -2843,7 +2847,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
 
        if (sock) {
                sk->sk_type     =       sock->type;
-               RCU_INIT_POINTER(sk->sk_wq, sock->wq);
+               RCU_INIT_POINTER(sk->sk_wq, &sock->wq);
                sock->sk        =       sk;
                sk->sk_uid      =       SOCK_INODE(sock)->i_uid;
        } else {