From: "Steve French" <smfrench@gmail.com>
To: Stalin Kenny <stalinlinux@gmail.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: context imbalance false positive sparse warnings
Date: Tue, 19 Aug 2008 17:22:55 -0500 [thread overview]
Message-ID: <524f69650808191522r21fc4babqaf173c9df558afc1@mail.gmail.com> (raw)
In-Reply-To: <8cef9d540808191500n10fa910eo674c8b8f2dd5b612@mail.gmail.com>
On Tue, Aug 19, 2008 at 5:00 PM, Stalin Kenny <stalinlinux@gmail.com> 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@gmail.com> 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@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
--
Thanks,
Steve
next prev parent reply other threads:[~2008-08-19 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 21:47 context imbalance false positive sparse warnings Steve French
2008-08-19 22:00 ` Stalin Kenny
2008-08-19 22:22 ` Steve French [this message]
2008-08-19 22:26 ` Harvey Harrison
2008-09-10 7:47 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524f69650808191522r21fc4babqaf173c9df558afc1@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=stalinlinux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).