Skip to content
Snippets Groups Projects
Commit da905873 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Linus Torvalds
Browse files

reiserfs: fix inode mutex - reiserfs lock misordering


reiserfs_unpack() locks the inode mutex with reiserfs_mutex_lock_safe()
to protect against reiserfs lock dependency.  However this protection
requires to have the reiserfs lock to be locked.

This is the case if reiserfs_unpack() is called by reiserfs_ioctl but
not from reiserfs_quota_on() when it tries to unpack tails of quota
files.

Fix the ordering of the two locks in reiserfs_unpack() to fix this
issue.

Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Reported-by: default avatarMarkus Gapp <markus.gapp@gmx.net>
Reported-by: default avatarJan Kara <jack@suse.cz>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: <stable@kernel.org>		[2.6.36.x]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d1d73578
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment