]> git.hungrycats.org Git - linux/commitdiff
Revert "sctp: do not peel off an assoc from one netns to another one"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 11:29:45 +0000 (12:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:37:28 +0000 (08:37 +0000)
This reverts commit 2a0e60907e54dad75e9b3568d02bec11d6e74f6b which is
commit df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 upstream as I messed up
by applying it to the tree twice.

Reported-by: Michal Kubecek <mkubecek@suse.cz>
Cc: ChunYu Wang <chunwang@redhat.com>
Cc: Xin Long <lucien.xin@gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sctp/socket.c

index 272edd7748a0b96355055edc83d81b8370af0e8e..7f0f689b8d2b1535708f2facc4932682a45c8bbc 100644 (file)
@@ -4453,10 +4453,6 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
        struct socket *sock;
        int err = 0;
 
-       /* Do not peel off from one netns to another one. */
-       if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
-               return -EINVAL;
-
        /* Do not peel off from one netns to another one. */
        if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
                return -EINVAL;