Frederic Weisbecker
3f259d092c
reiserfs: fix dependency inversion between inode and reiserfs mutexes
...
The reiserfs mutex already depends on the inode mutex, so we can't lock
the inode mutex in reiserfs_unpack() without using the safe locking API,
because reiserfs_unpack() is always called with the reiserfs mutex locked.
This fixes:
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.35c #13
-------------------------------------------------------
lilo/1606 is trying to acquire lock:
(&sb->s_type->i_mutex_key#8){+.+.+.}, at: [<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]
but task is already holding lock:
(&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&REISERFS_SB(s)->lock){+.+.+.}:
[<c1056347>] lock_acquire+0x67/0x80
[<c12f083d>] __mutex_lock_common+0x4d/0x410
[<c12f0c58>] mutex_lock_nested+0x18/0x20
[<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]
[<d0329e9a>] reiserfs_lookup_privroot+0x2a/0x90 [reiserfs]
[<d0316b81>] reiserfs_fill_super+0x941/0xe60 [reiserfs]
[<c10b7d17>] get_sb_bdev+0x117/0x170
[<d0313e21>] get_super_block+0x21/0x30 [reiserfs]
[<c10b74ba>] vfs_kern_mount+0x6a/0x1b0
[<c10b7659>] do_kern_mount+0x39/0xe0
[<c10cebe0>] do_mount+0x340/0x790
[<c10cf0b4>] sys_mount+0x84/0xb0
[<c12f25cd>] syscall_call+0x7/0xb
-> #0 (&sb->s_type->i_mutex_key#8){+.+.+.}:
[<c1056186>] __lock_acquire+0x1026/0x1180
[<c1056347>] lock_acquire+0x67/0x80
[<c12f083d>] __mutex_lock_common+0x4d/0x410
[<c12f0c58>] mutex_lock_nested+0x18/0x20
[<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]
[<d0329772>] reiserfs_ioctl+0x272/0x320 [reiserfs]
[<c10c3228>] vfs_ioctl+0x28/0xa0
[<c10c3c5d>] do_vfs_ioctl+0x32d/0x5c0
[<c10c3f53>] sys_ioctl+0x63/0x70
[<c12f25cd>] syscall_call+0x7/0xb
other info that might help us debug this:
1 lock held by lilo/1606:
#0 : (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]
stack backtrace:
Pid: 1606, comm: lilo Not tainted 2.6.35c #13
Call Trace:
[<c1056186>] __lock_acquire+0x1026/0x1180
[<c1056347>] lock_acquire+0x67/0x80
[<c12f083d>] __mutex_lock_common+0x4d/0x410
[<c12f0c58>] mutex_lock_nested+0x18/0x20
[<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]
[<d0329772>] reiserfs_ioctl+0x272/0x320 [reiserfs]
[<c10c3228>] vfs_ioctl+0x28/0xa0
[<c10c3c5d>] do_vfs_ioctl+0x32d/0x5c0
[<c10c3f53>] sys_ioctl+0x63/0x70
[<c12f25cd>] syscall_call+0x7/0xb
Reported-by: Jarek Poplawski <jarkao2@gmail.com>
Tested-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: <stable@kernel.org> [2.6.32 and later]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-01 10:50:59 -07:00
..
2010-09-13 08:13:03 -05:00
2010-08-09 16:47:39 -04:00
2010-08-09 16:48:51 -04:00
2010-08-13 10:37:30 -07:00
2010-08-09 00:13:34 +02:00
2010-08-11 08:59:06 -07:00
2010-06-16 18:05:05 +02:00
2010-08-09 16:48:53 -04:00
2010-08-10 15:22:42 -07:00
2010-08-12 09:51:35 -07:00
2010-09-17 12:30:31 -07:00
2010-09-14 23:21:03 +00:00
2010-09-19 11:03:09 -07:00
2010-06-04 17:16:29 -04:00
2010-08-18 01:01:33 -04:00
2010-05-19 22:41:57 -04:00
2010-05-21 18:31:12 -04:00
2010-08-05 14:23:45 -05:00
2010-08-27 10:50:53 -05:00
2010-08-11 09:19:43 -07:00
2010-08-09 16:48:45 -04:00
2010-08-10 11:26:52 -07:00
2010-08-10 11:26:52 -07:00
2010-08-18 01:09:01 -04:00
2010-08-10 11:26:52 -07:00
2010-08-12 09:51:35 -07:00
2010-09-07 13:42:41 +02:00
2010-09-17 14:00:10 +01:00
2010-08-09 16:48:37 -04:00
2010-08-09 16:48:37 -04:00
2010-08-18 06:21:10 -04:00
2010-08-09 16:48:17 -04:00
2010-08-09 16:48:16 -04:00
2010-08-09 16:47:49 -04:00
2010-08-11 00:29:47 -04:00
2010-08-18 01:09:01 -04:00
2010-08-18 01:09:01 -04:00
2010-08-10 11:49:21 -07:00
2010-08-10 15:33:09 -07:00
2010-03-30 22:02:32 +09:00
2010-08-14 00:24:24 +02:00
2010-09-09 18:57:25 -07:00
2010-08-10 13:58:28 -07:00
2010-09-12 19:57:50 -04:00
2010-03-30 22:02:32 +09:00
2010-09-12 19:57:50 -04:00
2010-08-30 10:18:03 +09:00
2010-08-27 21:42:11 -04:00
2010-08-09 16:48:37 -04:00
2010-09-29 17:33:05 -07:00
2010-08-10 11:47:36 -07:00
2010-08-13 10:06:55 +02:00
2010-10-01 10:50:59 -07:00
2010-08-09 16:47:31 -04:00
2010-08-10 11:26:52 -07:00
2010-08-09 16:47:39 -04:00
2010-10-01 10:50:59 -07:00
2010-08-09 16:48:00 -04:00
2010-08-08 22:29:33 +00:00
2010-09-03 17:26:28 -07:00
2010-08-11 08:59:23 -07:00
2010-08-10 11:26:52 -07:00
2010-08-10 11:26:52 -07:00
2010-08-18 01:09:01 -04:00
2010-09-29 07:51:03 -05:00
2010-09-22 17:22:39 -07:00
2010-05-27 22:03:05 -04:00
2010-08-09 16:47:39 -04:00
2010-08-14 00:24:24 +02:00
2010-03-30 22:02:32 +09:00
2010-06-01 08:11:06 -07:00
2010-03-30 22:02:32 +09:00
2010-06-29 15:29:31 -07:00
2010-09-09 18:57:24 -07:00
2010-08-17 18:07:43 -07:00
2010-08-23 13:36:59 +02:00
2010-08-07 18:20:39 +02:00
2010-08-11 08:59:18 -07:00
2010-08-18 01:09:01 -04:00
2010-09-22 09:48:47 +02:00
2010-08-14 00:24:24 +02:00
2010-09-22 17:22:38 -07:00
2010-08-18 08:35:48 -04:00
2010-09-09 18:57:22 -07:00
2010-08-09 16:47:44 -04:00
2010-03-30 22:02:32 +09:00
2010-05-11 17:43:58 +02:00
2010-09-10 08:10:26 -07:00
2010-09-09 18:57:25 -07:00
2010-03-30 22:02:32 +09:00
2010-08-18 08:35:48 -04:00
2010-08-11 08:59:02 -07:00
2010-03-30 22:02:32 +09:00
2010-08-18 08:35:46 -04:00
2010-09-22 09:48:47 +02:00
2010-08-18 01:04:22 -04:00
2010-08-10 11:39:13 -07:00
2010-08-18 08:35:48 -04:00
2010-08-14 00:24:24 +02:00
2010-03-30 22:02:32 +09:00
2010-07-20 17:30:22 +02:00
2010-08-09 16:47:39 -04:00
2010-05-21 18:31:17 -04:00
2010-08-18 06:24:41 -04:00
2010-03-30 22:02:32 +09:00
2010-08-18 08:35:48 -04:00
2010-09-07 13:46:20 -07:00
2010-08-18 08:35:47 -04:00
2010-06-10 19:08:34 +02:00
2010-08-18 08:35:48 -04:00
2010-07-28 09:58:32 -04:00
2010-08-09 20:45:05 -07:00
2010-08-11 08:59:20 -07:00
2010-08-07 18:52:56 +02:00
2010-08-13 16:53:13 -07:00
2010-08-09 16:48:44 -04:00
2010-08-18 08:35:48 -04:00
2010-08-09 16:47:43 -04:00
2010-05-20 13:21:42 -07:00
2010-08-13 16:53:13 -07:00
2010-03-30 22:02:32 +09:00
2010-05-21 18:31:18 -04:00