nfsd: fix legacy client tracking initialization
Subsystems (2)
PATCH 1/1 nfsd: fix legacy client tracking initialization
Get rid of the nfsd4_legacy_tracking_ops->init() call in check_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up calling nfsd4_legacy_tracking_ops->init() twice, and the second time we'll trigger the BUG_ON() in nfsd4_init_recdir().
--- fs/nfsd/nfs4recover.c | 1 - 1 file changed, 1 deletion(-)
fs/nfsd/nfs4recover.c +0 -1
@@ -2052,7 +2052,6 @@ static inline int check_for_legacy_methods(int status, struct net *net)path_put (&path);if (status)return -ENOTDIR ; - status = nn->client_tracking_ops->init (net); }return status; }
Signature · 1 line
2.47.1
[email protected]
maintainerFrom: Chuck Lever <[email protected]>
Quoted 8 lines · Scott Mayhew
Get rid of the
nfsd4_legacy_tracking_ops->init()call incheck_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up callingnfsd4_legacy_tracking_ops->init()twice, and the second time we'll trigger theBUG_ON()innfsd4_init_recdir().[...]
Applied to nfsd-testing for v6.14, thanks!
[1/1] nfsd: fix legacy client tracking initialization
commit: 0f0f93d93be82021f30c23eeca6aaf8e59a276d0
--
Chuck Lever
Quoted 19 lines · Scott Mayhew
Get rid of the
nfsd4_legacy_tracking_ops->init()call incheck_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up callingnfsd4_legacy_tracking_ops->init()twice, and the second time we'll trigger theBUG_ON()innfsd4_init_recdir().Fixes 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking")Reported-by Jur van der Burg <[email protected]>Signed-off-by Scott Mayhew <[email protected]>--- fs/nfsd/nfs4recover.c | 1 - 1 file changed, 1 deletion(-)fs/nfsd/nfs4recover.c +0
-0
fs/nfsd/nfs4recover.c static inline int check_for_legacy_methods(int status, struct net *net) · line 2057
Quoted 7 lines
fs/nfsd/nfs4recover.c +0
-1@@ -2052,7 +2052,6 @@ static inline int check_for_legacy_methods(int status, struct net *net)path_put (&path);if (status)return -ENOTDIR ; - status = nn->client_tracking_ops->init (net); }return status; }
[email protected]
maintainerFrom: Chuck Lever <[email protected]>
Quoted 8 lines · Scott Mayhew
Get rid of the
nfsd4_legacy_tracking_ops->init()call incheck_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up callingnfsd4_legacy_tracking_ops->init()twice, and the second time we'll trigger theBUG_ON()innfsd4_init_recdir().[...]
Applied to nfsd-testing for v6.14, thanks!
[1/1] nfsd: fix legacy client tracking initialization
(no commit info)
--
Chuck Lever
Hi,
Quoted 19 lines · Scott Mayhew
Get rid of the
nfsd4_legacy_tracking_ops->init()call incheck_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up callingnfsd4_legacy_tracking_ops->init()twice, and the second time we'll trigger theBUG_ON()innfsd4_init_recdir().Fixes 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking")Reported-by Jur van der Burg <[email protected]>Signed-off-by Scott Mayhew <[email protected]>--- fs/nfsd/nfs4recover.c | 1 - 1 file changed, 1 deletion(-)fs/nfsd/nfs4recover.c +0
-0
fs/nfsd/nfs4recover.c static inline int check_for_legacy_methods(int status, struct net *net) · line 2056
Quoted 6 lines
fs/nfsd/nfs4recover.c +0
-1@@ -2052,7 +2052,6 @@ static inline int check_for_legacy_methods(int status, struct net *net)path_put (&path);if (status)return -ENOTDIR ; - status = nn->client_tracking_ops->init (net); }return status;
With a kernel with CONFIG_NFSD_LEGACY_CLIENT_TRACKING=y and this change applied, successfully tested against the issue reported in
https://bugs.debian.org/1087900
https://bugs.debian.org/1091439
Regards,
Salvatore