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>] [day] [month] [year] [list]
Date:	Thu, 30 Nov 2006 19:13:27 -0800
From:	Josh Triplett <josh@...edesktop.org>
To:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	Oleg Nesterov <oleg@...sign.ru>,
	"Paul E. McKenney" <paulmck@...ibm.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Jens Axboe <jens.axboe@...cle.com>
Subject: [PATCH] Add Sparse annotations to QRCU lock functions and rcutorture
 wrappers

Signed-off-by: Josh Triplett <josh@...edesktop.org>
---
 include/linux/srcu.h |    4 ++--
 kernel/rcutorture.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index fcdb749..03a9010 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -64,8 +64,8 @@ struct qrcu_struct {
 };
 
 int init_qrcu_struct(struct qrcu_struct *qp);
-int qrcu_read_lock(struct qrcu_struct *qp);
-void qrcu_read_unlock(struct qrcu_struct *qp, int idx);
+int qrcu_read_lock(struct qrcu_struct *qp) __acquires(qp);
+void qrcu_read_unlock(struct qrcu_struct *qp, int idx) __releases(qp);
 void synchronize_qrcu(struct qrcu_struct *qp);
 
 /**
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index ddafbbf..e1c5c4b 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -482,12 +482,12 @@ static void qrcu_torture_cleanup(void)
 	cleanup_qrcu_struct(&qrcu_ctl);
 }
 
-static int qrcu_torture_read_lock(void)
+static int qrcu_torture_read_lock(void) __acquires(&qrcu_ctl)
 {
 	return qrcu_read_lock(&qrcu_ctl);
 }
 
-static void qrcu_torture_read_unlock(int idx)
+static void qrcu_torture_read_unlock(int idx) __releases(&qrcu_ctl)
 {
 	qrcu_read_unlock(&qrcu_ctl, idx);
 }
-- 
1.4.4.1



Download attachment "signature.asc" of type "application/pgp-signature" (253 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ