diff options
| author | Jeff Mahoney <[email protected]> | 2007-04-23 14:41:17 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-04-24 08:23:09 -0700 |
| commit | 9b7f375505f5611efb562065b57814b28a81abc3 (patch) | |
| tree | 3f51e49ca5b70081bf15f4ce9d7ddbd289917932 /include/linux/debugobjects.h | |
| 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 <[email protected]>
Signed-off-by: Jeff Mahoney <[email protected]>
Cc: Andrea Righi <[email protected]>
Cc: "Vladimir V. Saveliev" <[email protected]>
Cc: Edward Shishkin <[email protected]>
Cc: Alex Zarochentsev <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions