Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1300168

[PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse

Path csiph.com!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Niranjan Dighe <niranjan.dighe@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse
Date Sun, 03 Jan 2016 04:00:01 +0100
Message-ID <qMH3H-7UP-1@gated-at.bofh.it> (permalink)
X-Original-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>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=iw46QC9VHAuKVnaXDxGkD6UT/N0herhiBNGmJ6AEnps=; b=Fi+Fd2u2Cs7A0uDe1YQOjIhkFskKC2l4eXOCRKS4aJZAahleN+3iaSIp69RhOqaadn EAMfC13dlf4s66tJh+0kPv0MGPvSZsA6wkA7lIiGeXArARI/R5vroCyiLz2qXupiKCjb s2ARyrMeTFBm3GOlZWIdqCIX7nII1PnNejMkBg2FIMmL0S8dwWrob36yQPcAmwPJ/vdg x0lDrK8T9GSqjiINdivuirZNx3bDI8EudNqOdPSGkRIszhXLGN/p+0KVa1iOyLgPN45g 79PfGpK7iXWoQl1A9q7wP2HveufRq8ZEyH0EWNZojfiA8UQMTL0ZNLP5+tKQx7qrkb3O JfRA==
X-Received by 10.98.16.83 with SMTP id y80mr42610657pfi.150.1451789829151; Sat, 02 Jan 2016 18:57:09 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
X-Original-Date Sun, 3 Jan 2016 08:27:04 +0530
X-Original-Message-ID <20160103025704.GA31228@codebox>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1300168

Show key headers only | View 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

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] staging: lustre: Fix 'unexpected unlock' warning generated  by sparse Niranjan Dighe <niranjan.dighe@gmail.com> - 2016-01-03 04:00 +0100

csiph-web