All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niranjan Dighe <niranjan.dighe@gmail.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mike Rapoport <mike.rapoport@gmail.com>,
	Jeremiah Mahler <jmmahler@gmail.com>,
	James Simmons <jsimmons@infradead.org>,
	Haneen Mohammed <hamohammed.sa@gmail.com>,
	Mike Shuey <shuey@purdue.edu>, Arnd Bergmann <arnd@arndb.de>,
	Al Viro <viro@ZenIV.linux.org.uk>
Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse
Date: Sun, 3 Jan 2016 08:27:04 +0530	[thread overview]
Message-ID: <20160103025704.GA31228@codebox> (raw)

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@gmail.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


             reply	other threads:[~2016-01-03  2:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03  2:57 Niranjan Dighe [this message]
2016-02-03 22:23 ` [lustre-devel] [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse Greg Kroah-Hartman
2016-02-03 22:23   ` Greg Kroah-Hartman
2016-02-07  9:00   ` [lustre-devel] " Niranjan Dighe
2016-02-07  9:00     ` Niranjan Dighe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160103025704.GA31228@codebox \
    --to=niranjan.dighe@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=jmmahler@gmail.com \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=mike.rapoport@gmail.com \
    --cc=oleg.drokin@intel.com \
    --cc=shuey@purdue.edu \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.