diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-11-26 12:03:19 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-11-26 12:03:19 +0800 |
commit | d8e6d09cfa7260b12501ce94ca35977be998d4a7 (patch) | |
tree | 1fe3a34e78b5978fe95fb6ba96f7d070778d5c7a /net/sctp/socket.c | |
parent | c0426ccf530144f8af2e68165aa10cc52cd8f803 (diff) | |
parent | 29ffb9c1fb4acbda207985ad1558191ffb776bee (diff) |
Merge tag 'v4.4.102' into linux-linaro-lsk-v4.4lsk-v4.4-17.11
This is the 4.4.102 stable release
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 7f0f689b8d2b..272edd7748a0 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4457,6 +4457,10 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) 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; + if (!asoc) return -EINVAL; |