diff options
| author | Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn> | 2026-05-29 17:06:24 +0800 |
|---|---|---|
| committer | Dominique Martinet <asmadeus@codewreck.org> | 2026-09-13 08:21:27 +0000 |
| commit | 37dce65a0b4356d7ec289a5d09cece5db241c302 (patch) | |
| tree | 3edb86143b2353825594ef2396a49fc7700ab93d /scripts/basic | |
| parent | 5852cdf0006ff0f1d9a56f06197673d4e4270220 (diff) | |
| download | linux-37dce65a0b4356d7ec289a5d09cece5db241c302.tar.gz linux-37dce65a0b4356d7ec289a5d09cece5db241c302.zip | |
9p: use fc->net_ns for network namespace in RDMA and socket transports
The 9p RDMA transport currently passes &init_net to rdma_create_id().
As a result, RDMA address resolution and connection setup are performed
in the initial network namespace, even when the mount is initiated from
a non-initial network namespace.
This differs from the socket-based 9p transports, which create sockets
in current->nsproxy->net_ns. Use fc->net_ns for both the RDMA and
socket transports instead, so that transport setup follows the VFS
mount namespace context rather than depending on the calling process's
current namespace.
This avoids surprising behaviour where a 9p RDMA mount from a container
or other non-initial network namespace may use the host namespace for
RDMA CM operations.
Fixes: fa20105e09e9 ("IB/cma: Add support for network namespaces")
Reported-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Reported-by: Yuxiang Yang <yangyx22@mails.tsinghua.edu.cn>
Reported-by: Ao Wang <wangao@seu.edu.cn>
Reported-by: Xuewei Feng <fengxw06@126.com>
Reported-by: Qi Li <qli01@tsinghua.edu.cn>
Reported-by: Ke Xu <xuke@tsinghua.edu.cn>
Suggested-by: Dominique Martinet <asmadeus@codewreck.org>
Assisted-by: GLM:GLM-5.1
Signed-off-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Message-ID: <20260529090625.78761-1-zhaoyz24@mails.tsinghua.edu.cn>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
