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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384447393-13838-4-git-send-email-bergwolf@gmail.com>
Date:	Fri, 15 Nov 2013 00:42:50 +0800
From:	Peng Tao <bergwolf@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, Niu Yawei <yawei.niu@...el.com>,
	Peng Tao <bergwolf@...il.com>,
	Andreas Dilger <andreas.dilger@...el.com>
Subject: [PATCH 03/26] staging/lustre/clio: incorrect assertions in 'enable-invariants'

From: Niu Yawei <yawei.niu@...el.com>

Fixed several incorrect assumptions in 'enable-invariants'.

Lustre-change: http://review.whamcloud.com/6832
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3521
Signed-off-by: Niu Yawei <yawei.niu@...el.com>
Reviewed-by: Bobi Jam <bobijam@...il.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@...el.com>
Reviewed-by: Oleg Drokin <oleg.drokin@...el.com>
Signed-off-by: Peng Tao <bergwolf@...il.com>
Signed-off-by: Andreas Dilger <andreas.dilger@...el.com>
---
 drivers/staging/lustre/lustre/obdclass/cl_page.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 2a5ce37..d997c8e 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -481,7 +481,7 @@ static inline int cl_page_invariant(const struct cl_page *pg)
 	child  = pg->cp_child;
 	owner  = pg->cp_owner;
 
-	return cl_page_in_use(pg) &&
+	return cl_page_in_use_noref(pg) &&
 		ergo(parent != NULL, parent->cp_child == pg) &&
 		ergo(child != NULL, child->cp_parent == pg) &&
 		ergo(child != NULL, pg->cp_obj != child->cp_obj) &&
@@ -814,7 +814,7 @@ void cl_page_disown0(const struct lu_env *env,
 
 	state = pg->cp_state;
 	PINVRNT(env, pg, state == CPS_OWNED || state == CPS_FREEING);
-	PINVRNT(env, pg, cl_page_invariant(pg));
+	PINVRNT(env, pg, cl_page_invariant(pg) || state == CPS_FREEING);
 	cl_page_owner_clear(pg);
 
 	if (state == CPS_OWNED)
@@ -989,7 +989,8 @@ EXPORT_SYMBOL(cl_page_unassume);
 void cl_page_disown(const struct lu_env *env,
 		    struct cl_io *io, struct cl_page *pg)
 {
-	PINVRNT(env, pg, cl_page_is_owned(pg, io));
+	PINVRNT(env, pg, cl_page_is_owned(pg, io) ||
+			 pg->cp_state == CPS_FREEING);
 
 	pg = cl_page_top(pg);
 	io = cl_io_top(io);
-- 
1.7.9.5

--
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