]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: set correct vfs info for subflows
authorPaolo Abeni <pabeni@redhat.com>
Thu, 7 May 2020 16:53:24 +0000 (18:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 May 2020 01:16:05 +0000 (18:16 -0700)
commit1829ff8f78721bd285efc93a0cb3cf89d0826417
treeba87f28fb6b4c9ff24b46a695daa884bf6d07747
parentc929a411a6dfab69a7c07f1cf5358432a9c932c9
mptcp: set correct vfs info for subflows

When a subflow is created via mptcp_subflow_create_socket(),
a new 'struct socket' is allocated, with a new i_ino value.

When inspecting TCP sockets via the procfs and or the diag
interface, the above ones are not related to the process owning
the MPTCP master socket, even if they are a logical part of it
('ss -p' shows an empty process field)

Additionally, subflows created by the path manager get
the uid/gid from the running workqueue.

Subflows are part of the owning MPTCP master socket, let's
adjust the vfs info to reflect this.

After this patch, 'ss' correctly displays subflows as belonging
to the msk socket creator.

Fixes: e66e43acef20 ("mptcp: Associate MPTCP context with TCP socket")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c