diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-11-26 12:03:43 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-11-26 12:03:43 +0800 |
commit | 2af79bd1142d88667c40bb5cc65a3cd91db5a6c0 (patch) | |
tree | 73f57f5a9c57b0ab22fa456bc6926467c94e9099 /net/sctp/socket.c | |
parent | d5aff662273133ff050acb8cac683d5f73c5fbf3 (diff) | |
parent | 133e6ccf46f1704a4a680ef45565e970ac9a7f9c (diff) |
Merge tag 'v4.9.65' into linux-linaro-lsk-v4.9lsk-v4.9-17.11
This is the 4.9.65 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 ffcc8aa78db7..c062ceae19e6 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4764,6 +4764,10 @@ 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; + if (!asoc) return -EINVAL; |