linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse: possible false report of context imbalance
@ 2013-10-17  3:23 Larry Finger
  2013-10-17 16:25 ` Josh Triplett
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2013-10-17  3:23 UTC (permalink / raw)
  To: Christopher Li; +Cc: Linux-Sparse, LKML

Hi,

Sparse reports the following:

   CHECK   drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_mlme.c:1003:9: warning: context imbalance in 
'rtw_free_assoc_resources' - different lock contexts for basic block

The code in question is as follows:

         if (lock_scanned_queue)
                 spin_lock_bh(&(pmlmepriv->scanned_queue.lock));

         pwlan = rtw_find_network(&pmlmepriv->scanned_queue, 
tgt_network->network.MacAddress);

         if (lock_scanned_queue)
                 spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));

As this fragment uses the identical test to unlock that is used to lock, and the 
test variable is not touched, I think this is a false indication. I am using 
version 0.4.4 of sparse.

Thanks,

Larry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-17 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17  3:23 sparse: possible false report of context imbalance Larry Finger
2013-10-17 16:25 ` Josh Triplett
2013-10-17 17:41   ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).