From: Jeff Mahoney <jeffm@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: a.righi@cineca.it, "Vladimir V. Saveliev" <vs@namesys.com>,
linux-kernel@vger.kernel.org, reiserfs-dev@namesys.com,
Edward Shishkin <edward@namesys.com>,
zam@clusterfs.com, ak@suse.de
Subject: Re: [PATCH] reiserfs: fix xattr root locking/refcount bug
Date: Sun, 22 Apr 2007 16:49:56 -0400 [thread overview]
Message-ID: <462BCA74.5020109@suse.com> (raw)
In-Reply-To: <20070421123956.f74575d0.akpm@linux-foundation.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Morton wrote:
> On Sat, 21 Apr 2007 11:26:31 -0400 Jeff Mahoney <jeffm@suse.com> wrote:
>
>> The listxattr() and getxattr() operations are only protected by a read
>> lock. As a result, if either of these operations run in parallel, a race
>> condition exists where the xattr_root will end up being cached twice,
>> which results in the leaking of a reference and a BUG() on umount.
>>
>> This patch refactors get_xa_root(), __get_xa_root(), and
>> create_xa_root(), into one get_xa_root() function that takes
>> the appropriate locking around the entire critical section.
>
> Great, thanks.
>
> Now we need to work out the timing. Our options are to shove
> it into 2.6.21 immediately, or to give it a run in 2.6.22-rc1 then
> backport into 2.6.21.x.
>
> What is everyone's confidence level?
I'm pretty confident in this patch for 2.6.21, but I wouldn't object to
waiting until 2.6.22-rc1 either. Operationally, the change isn't that
big and makes the locking more clear and the code simpler. I've tested
on populated file systems, virgin file systems, and tested the error
handling path with each. There is still a bug lurking in how a failure
in ACL inheritance is cleaned up that I ran into while testing, but this
patch didn't introduce it or exacerbate it. I'll add that to my xattr
patch queue.
- -Jeff
- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGK8p0LPWxlyuTD7IRAthXAJ9Hk4f40vwuir2fp2dyte5U1juzlgCeLyiW
UnrEFDbKp/iVAE+CrFVSmqs=
=6s1J
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2007-04-22 20:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070413095219.02075323.akpm@linux-foundation.org>
[not found] ` <462536B2.5060308@users.sourceforge.net>
[not found] ` <c04ebacf0704180152qdc72fcdnd0755dbf070b40d2@mail.gmail.com>
2007-04-18 14:16 ` Fwd: Fw: [2.6.20.4] BUG: dentry xattrs still in use in shrink_dcache_for_umount() with reiserfs Vladimir V. Saveliev
2007-04-18 15:00 ` Jeff Mahoney
2007-04-21 0:07 ` Andrew Morton
2007-04-21 1:45 ` Jeff Mahoney
2007-04-21 13:17 ` Andrea Righi
2007-04-21 14:31 ` Jeff Mahoney
2007-04-21 14:34 ` Jeff Mahoney
2007-04-21 15:26 ` [PATCH] reiserfs: fix xattr root locking/refcount bug Jeff Mahoney
2007-04-21 19:39 ` Andrew Morton
2007-04-22 10:28 ` Andrea Righi
2007-04-22 20:49 ` Jeff Mahoney [this message]
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=462BCA74.5020109@suse.com \
--to=jeffm@suse.com \
--cc=a.righi@cineca.it \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=edward@namesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-dev@namesys.com \
--cc=vs@namesys.com \
--cc=zam@clusterfs.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