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]
Date:	Sun, 3 Jan 2016 08:27:04 +0530
From:	Niranjan Dighe <niranjan.dighe@...il.com>
To:	Oleg Drokin <oleg.drokin@...el.com>,
	Andreas Dilger <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mike Rapoport <mike.rapoport@...il.com>,
	Jeremiah Mahler <jmmahler@...il.com>,
	James Simmons <jsimmons@...radead.org>,
	Haneen Mohammed <hamohammed.sa@...il.com>,
	Mike Shuey <shuey@...due.edu>, Arnd Bergmann <arnd@...db.de>,
	Al Viro <viro@...IV.linux.org.uk>
Cc:	lustre-devel@...ts.lustre.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated
 by sparse

Added annotation '__must_hold' to function ksocknal_send_keepalive_locked
which unlocks the lock ksocknal_data.ksnd_global_lock. As this lock is
not acquired in the current function, sparse warns about context imbalance

Signed-off-by: Niranjan Dighe <niranjan.dighe@...il.com>
---
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index 477b385..29525a0 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2336,6 +2336,7 @@ ksocknal_flush_stale_txs(ksock_peer_t *peer)
 
 static int
 ksocknal_send_keepalive_locked(ksock_peer_t *peer)
+__must_hold(&ksocknal_data.ksnd_global_lock)
 {
 	ksock_sched_t *sched;
 	ksock_conn_t *conn;
-- 
1.9.1

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