diff options
author | Jeff Mahoney | 2007-04-23 14:41:17 -0700 |
---|---|---|
committer | Linus Torvalds | 2007-04-24 08:23:09 -0700 |
commit | 9b7f375505f5611efb562065b57814b28a81abc3 (patch) | |
tree | 3f51e49ca5b70081bf15f4ce9d7ddbd289917932 /drivers/serial | |
parent | 1a641fceb6bb6b0930db1aadbda1aaf5711d65d6 (diff) |
reiserfs: fix xattr root locking/refcount bug
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.
Reported, diagnosed and tested by Andrea Righi <a.righi@cineca.it>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: Andrea Righi <a.righi@cineca.it>
Cc: "Vladimir V. Saveliev" <vs@namesys.com>
Cc: Edward Shishkin <edward@namesys.com>
Cc: Alex Zarochentsev <zam@namesys.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
0 files changed, 0 insertions, 0 deletions