All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: Stalin Kenny <stalinlinux@gmail.com>,
	linux-sparse@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: context imbalance false positive sparse warnings
Date: Tue, 19 Aug 2008 15:26:09 -0700	[thread overview]
Message-ID: <1219184769.17033.95.camel@brick> (raw)
In-Reply-To: <524f69650808191522r21fc4babqaf173c9df558afc1@mail.gmail.com>

On Tue, 2008-08-19 at 17:22 -0500, Steve French wrote:
> 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
> 
> 

Johannes Berg had a 9-patch series that improved this somewhat, but they had
some bugs in them (crashes).  But I've been running with them anyway as they
do improve cases like this significantly.

Harvey


  reply	other threads:[~2008-08-19 22:26 UTC|newest]

Thread overview: 6+ 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
2008-08-19 22:26     ` Harvey Harrison [this message]
2008-09-10  7:47       ` Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2008-08-19 21:19 Steve French

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=1219184769.17033.95.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-sparse@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.