linux/fs/nfs/filelayout
Jeff Layton 6b9785dc8b nfs: don't share pNFS DS connections between net namespaces
Currently, different NFS clients can share the same DS connections, even
when they are in different net namespaces. If a containerized client
creates a DS connection, another container can find and use it. When the
first client exits, the connection will close which can lead to stalls
in other clients.

Add a net namespace pointer to struct nfs4_pnfs_ds, and compare those
value to the caller's netns in _data_server_lookup_locked() when
searching for a nfs4_pnfs_ds to match.

Reported-by: Omar Sandoval <osandov@osandov.com>
Reported-by: Sargun Dillon <sargun@sargun.me>
Closes: https://lore.kernel.org/linux-nfs/Z_ArpQC_vREh_hEA@telecaster/
Tested-by: Sargun Dillon <sargun@sargun.me>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Link: https://lore.kernel.org/r/20250410-nfs-ds-netns-v2-1-f80b7979ba80@kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2025-04-27 23:25:44 -04:00
..
filelayout.c nfs: pass struct nfsd_file to nfs_init_pgio and nfs_init_commit 2024-09-23 15:03:30 -04:00
filelayout.h nfs41: Annotate struct nfs4_file_layout_dsaddr with __counted_by 2023-10-02 09:48:53 -07:00
filelayoutdev.c nfs: don't share pNFS DS connections between net namespaces 2025-04-27 23:25:44 -04:00
Makefile