summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOlga Kornievskaia <okorniev@redhat.com>2025-10-16 01:08:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 17:34:03 +0300
commitefbc2d6a929189ae44ff0ab812e2b1869c6bd80e (patch)
tree9506f8da81050e77d43e98422b5920c7d62261c3 /include
parent0a1ee3c932dcf6f446e69a0ce67f36550a69a9ed (diff)
downloadlinux-efbc2d6a929189ae44ff0ab812e2b1869c6bd80e.tar.xz
nfsd: unregister with rpcbind when deleting a transport
[ Upstream commit 898374fdd7f06fa4c4a66e8be3135efeae6128d5 ] When a listener is added, a part of creation of transport also registers program/port with rpcbind. However, when the listener is removed, while transport goes away, rpcbind still has the entry for that port/type. When deleting the transport, unregister with rpcbind when appropriate. ---v2 created a new xpt_flag XPT_RPCB_UNREG to mark TCP and UDP transport and at xprt destroy send rpcbind unregister if flag set. Suggested-by: Chuck Lever <chuck.lever@oracle.com> Fixes: d093c9089260 ("nfsd: fix management of listener transports") Cc: stable@vger.kernel.org Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/svc_xprt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 7064ebbd550b..72d1a08f4828 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -103,6 +103,9 @@ enum {
* it has access to. It is NOT counted
* in ->sv_tmpcnt.
*/
+ XPT_RPCB_UNREG, /* transport that needs unregistering
+ * with rpcbind (TCP, UDP) on destroy
+ */
};
static inline void svc_xprt_set_valid(struct svc_xprt *xpt)