From: Eric Sandeen <sandeen@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: tytso@mit.edu, adilger@sun.com, linux-ext4@vger.kernel.org
Subject: Re: locking typo in ext4_mb_add_n_trim()
Date: Fri, 27 Mar 2009 09:16:59 -0500 [thread overview]
Message-ID: <49CCDFDB.9000109@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0903262204430.4167@usbsys.site>
Dan Carpenter wrote:
> Smatch (http://repo.or.cz/w/smatch.git/) complains about the locking in
> ext4_mb_add_n_trim() from fs/ext4/mballoc.c
>
> I think it's meant to be spin_unlock(&tmp_pa->pa_lock); on line 4442.
>
> 4438 list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order],
> 4439 pa_inode_list) {
> 4440 spin_lock(&tmp_pa->pa_lock);
> 4441 if (tmp_pa->pa_deleted) {
> 4442 spin_unlock(&pa->pa_lock);
> 4443 continue;
> 4444 }
>
> I can send a patch if I'm right or you could just give me a:
> Reported-by: Dan Carpenter <error27@gmail.com>
Seems right to me,
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
although I wonder why we don't trip over this in spinlock debugging
(seems like it'd lead to a double unlock at times) I wonder if we can
tie this to any other bugs we've seen.
Thanks,
-Eric
next prev parent reply other threads:[~2009-03-27 14:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 10:27 locking typo in ext4_mb_add_n_trim() Dan Carpenter
2009-03-27 14:16 ` Eric Sandeen [this message]
2009-03-27 23:36 ` Theodore Tso
2009-03-31 13:00 ` Jan Kara
2009-03-27 16:35 ` Aneesh Kumar K.V
2009-03-27 23:20 ` Theodore Tso
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=49CCDFDB.9000109@redhat.com \
--to=sandeen@redhat.com \
--cc=adilger@sun.com \
--cc=error27@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).