diff options
author | David S. Miller <davem@davemloft.net> | 2020-05-15 22:48:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-15 22:48:59 +0200 |
commit | da07f52d3caf6c24c6dbffb5500f379d819e04bd (patch) | |
tree | 836e51994554f1aeddeebb6cb6ee568944a467e7 /net/mptcp | |
parent | Merge branch 'mptcp-fix-MP_JOIN-failure-handling' (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
download | linux-da07f52d3caf6c24c6dbffb5500f379d819e04bd.tar.xz linux-da07f52d3caf6c24c6dbffb5500f379d819e04bd.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Move the bpf verifier trace check into the new switch statement in
HEAD.
Resolve the overlapping changes in hinic, where bug fixes overlap
the addition of VF support.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/protocol.c | 2 | ||||
-rw-r--r-- | net/mptcp/subflow.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index a61e60e94137..1f52a0fa31ed 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1629,6 +1629,8 @@ bool mptcp_finish_join(struct sock *sk) ret = mptcp_pm_allow_new_subflow(msk); if (ret) { + subflow->map_seq = msk->ack_seq; + /* active connections are already on conn_list */ spin_lock_bh(&msk->join_list_lock); if (!WARN_ON_ONCE(!list_empty(&subflow->node))) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 3cf2eeea9d80..53c75b0e5dce 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1036,6 +1036,16 @@ int mptcp_subflow_create_socket(struct sock *sk, struct socket **new_sock) if (err) return err; + /* the newly created socket really belongs to the owning MPTCP master + * socket, even if for additional subflows the allocation is performed + * by a kernel workqueue. Adjust inode references, so that the + * procfs/diag interaces really show this one belonging to the correct + * user. + */ + SOCK_INODE(sf)->i_ino = SOCK_INODE(sk->sk_socket)->i_ino; + SOCK_INODE(sf)->i_uid = SOCK_INODE(sk->sk_socket)->i_uid; + SOCK_INODE(sf)->i_gid = SOCK_INODE(sk->sk_socket)->i_gid; + subflow = mptcp_subflow_ctx(sf->sk); pr_debug("subflow=%p", subflow); |