lkml.org 
[lkml]   [2013]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsparse: possible false report of context imbalance
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


\
 
 \ /
  Last update: 2013-10-17 05:41    [W:0.037 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site