Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fa822e4 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds
Browse files

[PATCH] nfsd4: fix release_lockowner



We oops in list_for_each_entry(), because release_stateowner frees something
on the list we're traversing.

Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67be4313
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3084,7 +3084,12 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner *
	 * of the lockowner state released; so don't release any until all
	 * have been checked. */
	status = nfs_ok;
	list_for_each_entry(sop, &matches, so_perclient) {
	while (!list_empty(&matches)) {
		sop = list_entry(matches.next, struct nfs4_stateowner,
								so_perclient);
		/* unhash_stateowner deletes so_perclient only
		 * for openowners. */
		list_del(&sop->so_perclient);
		release_stateowner(sop);
	}
out: