Re: context imbalance false positive sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 19, 2008 at 5:00 PM, Stalin Kenny <stalinlinux@xxxxxxxxx> wrote:
>> Even the simplest use cases throw this error e.g. fs/super.c line 162-164:
>>
>> static void put_super(struct super_block *sb)
>> {
>>       spin_lock(&sb_lock);
>>       __put_super(sb);
>>       spin_unlock(&sb_lock);
>> }
>
> What is the sparse error when you call this function ?
CHECK   fs/super.c
fs/super.c:164:2: warning: context imbalance in 'put_super': wrong count at exit
fs/super.c:164:2:    context 'lock': wanted 0, got 1




>
> On 8/19/08, Steve French <smfrench@xxxxxxxxx> wrote:
>> Just building one directory of the kernel (./fs/*.c), ie "make bzImage
>> C=1" generates more than 200 sparse warnings similar to
>>       warning: context imbalance in 'set_task_ioprio': wrong count at exit
>>
>> Even the simplest use cases throw this error e.g. fs/super.c line 162-164:
>>
>> static void put_super(struct super_block *sb)
>> {
>>       spin_lock(&sb_lock);
>>       __put_super(sb);
>>       spin_unlock(&sb_lock);
>> }
>>
>>
>> It doesn't look like sparse has been fixed in a few months, unless the
>> sparse tool repository has moved from the
>>    /pub/scm / devel/sparse/sparse.git
>> directory on git.kernel.org
>>
>> Is there a way to turn just this warning off (the thousands of context
>> imbalance messages generated by the kernel build make it harder to see
>> real errors which sparse could catch)?
>>
>>
>> --
>> Thanks,
>>
>> Steve
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux