Skip to contentSkip to conversation

NFS: fix clp->cl_revoked list deletion causing softlock in nfsd

PATCH In review Andrew Elble 3 participants 3 messages Feb 25, 2015 – Feb 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: fix clp->cl_revoked list deletion causing softlock in nfsd

commit 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock") removed the use of the reaplist to clean out clp->cl_revoked. It failed to change list_entry() to walk clp->cl_revoked.next instead of reaplist.next

Fixes 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock")
---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +1 -1
index f6b2a09f793f..d2f2c37dc2db 100644
@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp)
 		nfs4_put_stid(&dp->dl_stid);
 	}
 	while (!list_empty(&clp->cl_revoked)) {
-		dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
+		dp = list_entry(clp->cl_revoked.next, struct nfs4_delegation, dl_recall_lru);
 		list_del_init(&dp->dl_recall_lru);
 		nfs4_put_stid(&dp->dl_stid);
 	}
Signature · 1 line
2.2.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · On Wed, 25 Feb 2015 08:42:55 -0500 Andrew Elble <[email protected]> wrote:

commit 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock") removed the use of the reaplist to clean out clp->cl_revoked. It failed to change list_entry() to walk clp->cl_revoked.next instead of reaplist.next

Fixes 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock")
---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +0 -0
index f6b2a09f793f..d2f2c37dc2db 100644

fs/nfsd/nfs4state.c __destroy_client(struct nfs4_client *clp) · line 1644

Quoted 8 lines
fs/nfsd/nfs4state.c +1 -1
@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp)
 		nfs4_put_stid(&dp->dl_stid);
 	}
 	while (!list_empty(&clp->cl_revoked)) {
-		dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
+		dp = list_entry(clp->cl_revoked.next, struct nfs4_delegation, dl_recall_lru);
 		list_del_init(&dp->dl_recall_lru);
 		nfs4_put_stid(&dp->dl_stid);
 	}

Looks right.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Elble
Quoted 19 lines · On Wed, 25 Feb 2015 08:42:55 -0500 Andrew Elble <[email protected]> wrote:

commit 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock") removed the use of the reaplist to clean out clp->cl_revoked. It failed to change list_entry() to walk clp->cl_revoked.next instead of reaplist.next

Fixes 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock")
---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +0 -0
index f6b2a09f793f..d2f2c37dc2db 100644

fs/nfsd/nfs4state.c __destroy_client(struct nfs4_client *clp) · line 1644

Quoted 8 lines
fs/nfsd/nfs4state.c +1 -1
@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp)
 		nfs4_put_stid(&dp->dl_stid);
 	}
 	while (!list_empty(&clp->cl_revoked)) {
-		dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
+		dp = list_entry(clp->cl_revoked.next, struct nfs4_delegation, dl_recall_lru);
 		list_del_init(&dp->dl_recall_lru);
 		nfs4_put_stid(&dp->dl_stid);
 	}