lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1355380636-10915-1-git-send-email-ycnian@gmail.com>
Date:	Thu, 13 Dec 2012 14:37:16 +0800
From:	ycnian@...il.com
To:	Trond.Myklebust@...app.com
Cc:	linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org,
	Yanchuan Nian <ycnian@...il.com>
Subject: [PATCH] nfs: Don't return referenced delegations

From: Yanchuan Nian <ycnian@...il.com>

The client returns unreferenced delegations in state management. It scans all
delegations and tests the NFS_DELEGATION_REFERENCED flag. if this flag is not
set, NFS_DELEGATION_RETURN will be set and the delegation will be returned. 
But unfortunately NFS_DELEGATION_REFERENCED is cleared after the testing, so 
delegations which are still being used will be returned in the next state
management.

Signed-off-by: Yanchuan Nian <ycnian@...il.com>
---
 fs/nfs/delegation.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 81c5eec..485e8c0 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -506,7 +506,7 @@ static void nfs_mark_return_unreferenced_delegations(struct nfs_server *server)
 	struct nfs_delegation *delegation;
 
 	list_for_each_entry_rcu(delegation, &server->delegations, super_list) {
-		if (test_and_clear_bit(NFS_DELEGATION_REFERENCED, &delegation->flags))
+		if (test_bit(NFS_DELEGATION_REFERENCED, &delegation->flags))
 			continue;
 		nfs_mark_return_delegation(server, delegation);
 	}
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ