diff options
| author | Jeff Layton <jlayton@kernel.org> | 2026-09-15 12:57:45 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-11 23:11:59 -0400 |
| commit | 95ac4b0c62f53742b89eb96ebd117b5546c24e49 (patch) | |
| tree | afab7953762ab2535328fb95680f96807f5260a3 /rust/kernel/alloc/allocator | |
| parent | 8fbc15adbbfcf5a3b1b883490c34fd06947058c6 (diff) | |
NFSD: report registerable programs in the listener_set reply
A caller that owns rpcbind must know what to register. It cannot work
that out for itself: nfsd_acl_version[] is built by CONFIG_NFSD_V2_ACL
and CONFIG_NFSD_V3_ACL, and no netlink command reports what is in it.
Reply to a listener_set that carried userspace-rpcbind with the programs
and versions that nfsd would have registered, plus the listeners to
register them for. Send the reply only when the request asked for it, so
an older caller still gets a bare ack.
nfsd_version_registerable() answers the same question for the reply and
for nfsd_rpcbind_set(), so nfsd_acl_rpcbind_set() goes away. It needs no
nfsacl-specific test: nfsd_acl_version[] has entries only at 2 and 3, so
the NULL pg_vers[] check already rejects everything
nfsd_support_acl_version() would have.
Listeners are reported only for the TCP and UDP classes, which is what
XPT_RPCB_UNREG marks. RDMA never reached rpcbind from the kernel either,
so there is nothing for the owner to register on its behalf.
The reply is sized from its contents rather than GENLMSG_DEFAULT_SIZE,
which listener_get uses and which overflows at ~27 listeners. The cost
is a large contiguous skb: the addr nest carries a full
sockaddr_storage, as listener_get's does, so a request at
NFSD_NL_LISTENER_MAX needs ~148K and alloc_skb() lands on an order-6
page allocation that can fail. Nothing rolls back on failure, matching
the rest of the command, so the extack says the listeners are up and
that a retry fetches the reply. Retrying is safe: a request that matches
the running set recreates nothing.
Assisted-by: LLM
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260915-nfsd-norpcb-v3-4-3c60d49ade02@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
