[PATCH] 9p: fix privport option setting wrong RDMA field
From: Stefano Garzarella
Date: Fri Jul 03 2026 - 06:24:45 EST
From: Stefano Garzarella <sgarzare@xxxxxxxxxx>
While reviewing a patch adding vsock transport to 9p, I noticed that
since commit 1f3e4142c0eb ("9p: convert to the new mount API"), the
Opt_privport case incorrectly sets rdma_opts->port instead of
rdma_opts->privport, so mounting with the privport option overwrites
the RDMA port number instead of enabling privileged port usage.
Fixes: 1f3e4142c0eb ("9p: convert to the new mount API")
Cc: stable@xxxxxxxxxxxxxxx
Cc: sandeen@xxxxxxxxxx
Signed-off-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>
---
fs/9p/v9fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 274c5157135d..f426cee37414 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -406,7 +406,7 @@ int v9fs_parse_param(struct fs_context *fc, struct fs_parameter *param)
break;
case Opt_privport:
fd_opts->privport = true;
- rdma_opts->port = true;
+ rdma_opts->privport = true;
break;
}
--
2.55.0