From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Guy Briggs Subject: sparse bogus unexpected unlock warning? untag_chunk Date: Sat, 8 Aug 2015 10:39:00 -0400 Message-ID: <20150808143900.GC31940@madcap2.tricolour.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com, linux-kernel@vger.kernel.org Cc: Al Viro List-Id: linux-audit@redhat.com After adding "C=1 CF=-D__CHECK_ENDIAN__" to my build script, sparse produced the following warning: kernel/audit_tree.c:222:13: warning: context imbalance in 'untag_chunk' - unexpected unlock It looks like a confused parser to me, because the locks appear to balance properly from my review. It doesn't say which lock triggered the warning, hash_lock, or entry->lock. The hash_lock is locked on call and returns in the same state. entry->lock looks fine. The fsnotify marks look get/put balanced too. Is sparse spewing bogons, or am I? - RGB -- Richard Guy Briggs Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat Remote, Ottawa, Canada Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545