Roland Dreier
51ee049e77
vfs: add lockdep annotation to s_vfs_rename_key for ecryptfs
...
> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.31-2-generic #14~rbd3
> ---------------------------------------------
> firefox-3.5/4162 is trying to acquire lock:
> (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
>
> but task is already holding lock:
> (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
>
> other info that might help us debug this:
> 3 locks held by firefox-3.5/4162:
> #0 : (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
> #1 : (&sb->s_type->i_mutex_key#11/1){+.+.+.}, at: [<ffffffff81139d5a>] lock_rename+0x6a/0xf0
> #2 : (&sb->s_type->i_mutex_key#11/2){+.+.+.}, at: [<ffffffff81139d6f>] lock_rename+0x7f/0xf0
>
> stack backtrace:
> Pid: 4162, comm: firefox-3.5 Tainted: G C 2.6.31-2-generic #14~rbd3
> Call Trace:
> [<ffffffff8108ae74>] print_deadlock_bug+0xf4/0x100
> [<ffffffff8108ce26>] validate_chain+0x4c6/0x750
> [<ffffffff8108d2e7>] __lock_acquire+0x237/0x430
> [<ffffffff8108d585>] lock_acquire+0xa5/0x150
> [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
> [<ffffffff815526ad>] __mutex_lock_common+0x4d/0x3d0
> [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
> [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
> [<ffffffff8120eaf9>] ? ecryptfs_rename+0x99/0x170
> [<ffffffff81552b36>] mutex_lock_nested+0x46/0x60
> [<ffffffff81139d31>] lock_rename+0x41/0xf0
> [<ffffffff8120eb2a>] ecryptfs_rename+0xca/0x170
> [<ffffffff81139a9e>] vfs_rename_dir+0x13e/0x160
> [<ffffffff8113ac7e>] vfs_rename+0xee/0x290
> [<ffffffff8113c212>] ? __lookup_hash+0x102/0x160
> [<ffffffff8113d512>] sys_renameat+0x252/0x280
> [<ffffffff81133eb4>] ? cp_new_stat+0xe4/0x100
> [<ffffffff8101316a>] ? sysret_check+0x2e/0x69
> [<ffffffff8108c34d>] ? trace_hardirqs_on_caller+0x14d/0x190
> [<ffffffff8113d55b>] sys_rename+0x1b/0x20
> [<ffffffff81013132>] system_call_fastpath+0x16/0x1b
The trace above is totally reproducible by doing a cross-directory
rename on an ecryptfs directory.
The issue seems to be that sys_renameat() does lock_rename() then calls
into the filesystem; if the filesystem is ecryptfs, then
ecryptfs_rename() again does lock_rename() on the lower filesystem, and
lockdep can't tell that the two s_vfs_rename_mutexes are different. It
seems an annotation like the following is sufficient to fix this (it
does get rid of the lockdep trace in my simple tests); however I would
like to make sure I'm not misunderstanding the locking, hence the CC
list...
Signed-off-by: Roland Dreier <rdreier@cisco.com >
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com >
Cc: Dustin Kirkland <kirkland@canonical.com >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
2010-05-21 18:31:22 -04:00
..
2010-05-17 17:24:04 +01:00
2010-04-28 12:55:14 -07:00
2010-05-17 22:39:48 -07:00
2010-03-12 15:52:44 -08:00
2010-05-19 12:57:48 -03:00
2010-05-20 09:41:44 -07:00
2010-04-13 23:27:16 -07:00
2010-02-16 16:01:22 -08:00
2010-04-05 19:18:07 +01:00
2010-04-21 16:37:49 -07:00
2010-04-15 16:21:34 -04:00
2010-05-14 01:56:12 +01:00
2010-05-11 18:35:27 +02:00
2010-02-24 18:32:59 +01:00
2010-01-18 08:25:47 +01:00
2010-02-24 18:34:48 +01:00
2010-03-08 13:17:01 +01:00
2010-05-03 08:33:00 -04:00
2010-04-19 13:17:10 +01:00
2010-04-23 14:43:45 -04:00
2010-04-26 13:51:09 -04:00
2010-05-14 15:09:37 -04:00
2010-05-20 21:26:12 -07:00
2010-03-30 22:02:32 +09:00
2010-03-12 15:53:10 -08:00
2010-05-04 13:34:27 -07:00
2010-05-14 17:08:01 -04:00
2009-12-16 07:20:13 -08:00
2010-05-21 09:34:30 -07:00
2010-05-21 09:34:30 -07:00
2010-05-19 13:38:54 -04:00
2009-12-15 08:53:35 -08:00
2010-02-08 14:38:36 -05:00
2010-04-25 08:54:42 +02:00
2010-03-16 19:47:54 +00:00
2010-03-06 11:26:46 -08:00
2009-12-16 07:20:18 -08:00
2010-05-18 09:17:01 -07:00
2010-03-19 08:58:16 +01:00
2010-02-17 11:17:38 +09:00
2010-02-12 09:41:59 -08:00
2010-02-17 17:27:40 -08:00
2010-02-22 13:44:45 +01:00
2010-02-22 13:44:45 +01:00
2010-05-04 09:25:02 -07:00
2010-03-24 16:31:22 -07:00
2010-03-12 19:10:29 +01:00
2010-05-10 14:24:26 +02:00
2010-04-28 09:20:33 +02:00
2010-03-12 15:52:32 -08:00
2010-02-05 07:35:05 -08:00
2010-02-02 15:58:48 -08:00
2010-03-12 15:52:32 -08:00
2010-04-09 14:07:56 -07:00
2010-03-06 11:26:29 -08:00
2010-04-02 20:12:03 +02:00
2010-03-04 11:46:14 +01:00
2009-12-15 08:53:28 -08:00
2009-12-15 08:53:32 -08:00
2010-02-04 13:29:53 -08:00
2010-05-15 07:16:33 -04:00
2010-04-22 18:32:12 -07:00
2010-05-10 16:08:01 -07:00
2010-03-30 22:02:32 +09:00
2010-03-06 02:32:27 +00:00
2010-05-21 09:37:31 -07:00
2010-02-05 12:22:34 +01:00
2010-03-06 02:32:33 +00:00
2010-03-06 02:32:31 +00:00
2010-03-12 15:52:42 -08:00
2010-03-04 08:20:14 -08:00
2010-05-21 19:30:44 +02:00
2010-03-11 16:32:14 +01:00
2010-03-11 15:51:23 +01:00
2009-12-15 08:53:25 -08:00
2010-02-26 08:25:35 +01:00
2009-12-15 08:53:33 -08:00
2010-05-17 10:00:15 +02:00
2010-03-06 11:26:46 -08:00
2009-12-15 08:53:27 -08:00
2010-04-07 21:54:42 -07:00
2010-01-25 12:26:38 -02:00
2010-02-20 13:13:44 -08:00
2010-05-21 19:30:39 +02:00
2010-03-29 14:30:19 -07:00
2009-12-23 13:44:12 +01:00
2010-03-29 14:30:19 -07:00
2009-12-23 13:33:54 +01:00
2010-02-26 19:19:39 +02:00
2010-05-18 16:19:30 +10:00
2010-02-25 10:34:49 +01:00
2010-04-26 16:13:54 +02:00
2009-12-17 20:55:57 -08:00
2009-12-16 12:16:42 -05:00
2010-04-22 16:05:44 -07:00
2010-04-15 22:18:36 +02:00
2010-04-15 22:18:36 +02:00
2009-12-29 19:58:17 +01:00
2010-03-06 11:26:25 -08:00
2010-05-21 09:37:28 -07:00
2010-03-26 23:51:44 +01:00
2009-12-17 10:58:17 -05:00
2010-05-21 18:31:22 -04:00
2010-03-29 09:14:47 -07:00
2010-03-30 22:02:32 +09:00
2010-05-21 07:19:18 -07:00
2010-05-18 08:35:04 -07:00
2010-03-30 22:02:32 +09:00
2010-05-21 18:31:18 -04:00
2010-04-03 14:56:05 -07:00
2010-03-16 08:55:32 +01:00
2010-03-06 11:26:27 -08:00
2010-03-01 14:08:10 +00:00
2010-02-04 00:50:44 -08:00
2009-12-16 07:20:01 -08:00
2010-05-21 09:34:29 -07:00
2010-05-19 14:05:06 +02:00
2010-02-26 17:05:10 -08:00
2010-02-09 11:13:56 +01:00
2010-04-06 21:50:03 +02:00
2010-03-07 22:17:09 +01:00
2009-12-15 08:53:12 -08:00
2010-05-01 04:32:14 +02:00
2010-03-13 20:56:56 +01:00
2010-05-20 00:18:59 +01:00
2010-02-12 17:32:41 +00:00
2010-03-02 12:23:42 +01:00
2010-03-14 11:14:58 -07:00
2010-05-04 11:09:28 +02:00
2010-03-24 08:20:03 +01:00
2010-02-18 14:30:17 -08:00
2010-04-01 01:31:13 -07:00
2010-04-20 11:52:21 -04:00
2010-03-30 19:08:43 -07:00
2010-03-30 19:08:43 -07:00
2010-05-17 22:49:55 -07:00
2010-05-15 23:48:02 -07:00
2010-04-13 01:30:48 -07:00
2010-04-03 14:56:04 -07:00
2010-04-03 14:56:04 -07:00
2010-05-03 12:33:13 +03:00
2010-03-21 21:19:02 -07:00
2010-04-22 16:12:36 -07:00
2010-05-06 00:47:21 -07:00
2010-02-02 07:32:29 -08:00
2010-02-07 03:06:22 -05:00
2010-04-23 23:35:28 -07:00
2010-01-11 16:28:01 -08:00
2010-02-16 15:55:17 -08:00
2010-05-11 16:10:47 -07:00
2009-12-15 20:42:06 +01:00
2010-04-13 23:27:16 -07:00
2010-05-21 10:48:12 -07:00
2010-03-30 22:02:32 +09:00
2010-03-12 15:52:36 -08:00
2009-12-16 07:20:18 -08:00
2010-03-07 18:01:13 +01:00
2010-03-23 13:33:50 -07:00
2010-03-12 15:52:40 -08:00
2010-03-12 15:52:40 -08:00
2010-05-11 14:40:55 +02:00
2010-05-03 11:50:57 +02:00
2010-04-01 16:12:48 -07:00
2010-03-30 22:02:32 +09:00
2010-05-21 19:30:40 +02:00
2010-02-25 12:51:41 +00:00
2009-12-15 08:53:26 -08:00
2010-01-30 01:47:49 -08:00
2010-04-22 16:12:36 -07:00
2010-05-20 21:04:27 -05:00
2009-12-16 12:19:59 +01:00
2010-05-18 23:01:55 -07:00
2010-02-16 16:01:21 -08:00
2010-02-17 11:17:38 +09:00
2010-04-23 02:08:44 +02:00
2010-05-20 21:04:29 -05:00
2010-01-11 09:34:04 -08:00
2010-03-12 15:53:10 -08:00
2009-12-31 19:45:04 +00:00
2010-03-15 15:29:39 +01:00
2010-05-21 09:37:32 -07:00
2010-02-25 17:49:25 +01:00
2010-05-21 09:37:29 -07:00
2010-04-21 16:33:29 -07:00
2009-12-16 06:56:12 -08:00
2010-05-14 15:09:32 -04:00
2010-04-20 13:08:30 +03:00
2010-03-01 12:36:14 -03:00
2010-04-03 14:56:05 -07:00
2010-03-15 12:47:59 +01:00
2009-12-17 11:41:51 +00:00
2009-12-17 11:33:33 +00:00
2009-12-17 11:27:09 +00:00
2010-05-19 13:38:55 -04:00
2009-12-15 08:53:36 -08:00
2010-01-12 21:02:00 -08:00
2010-03-06 11:26:35 -08:00
2009-12-26 20:40:34 -08:00
2010-02-03 17:39:50 +11:00
2010-05-21 09:37:30 -07:00
2010-02-09 11:13:56 +01:00
2010-04-28 08:51:12 +10:00
2010-02-19 03:35:12 -05:00
2010-03-12 15:52:38 -08:00
2009-12-15 08:53:20 -08:00
2010-03-17 18:43:47 -07:00
2009-12-15 08:53:12 -08:00
2010-05-18 00:52:36 -03:00
2009-12-15 08:53:20 -08:00
2010-01-15 01:43:29 -08:00
2010-03-12 15:52:28 -08:00
2010-04-08 13:37:18 +02:00
2010-03-08 16:55:37 +01:00
2010-03-03 14:07:59 -05:00
2010-05-18 23:01:55 -07:00
2010-04-08 10:18:47 +02:00
2010-03-04 08:15:33 -08:00
2010-05-11 14:40:55 +02:00
2010-04-13 14:49:34 -07:00
2010-02-10 23:49:08 +09:00
2009-12-22 12:27:34 -05:00
2010-04-22 12:31:11 +02:00
2010-05-01 15:00:15 -07:00
2010-05-20 21:04:44 -07:00
2010-04-20 16:22:01 +02:00
2010-03-25 11:17:26 +01:00
2010-02-19 08:03:28 +01:00
2010-05-21 09:37:32 -07:00
2010-05-06 01:31:27 -07:00
2010-05-14 15:09:30 -04:00
2010-05-14 15:09:21 -04:00
2010-05-14 15:09:30 -04:00
2010-05-10 11:32:33 +09:00
2010-05-07 14:55:50 -04:00
2009-12-15 08:53:13 -08:00
2010-03-12 15:52:38 -08:00
2010-05-06 00:47:21 -07:00
2009-12-15 08:53:12 -08:00
2010-02-14 07:13:47 -07:00
2010-03-18 07:30:31 -06:00
2010-02-15 15:14:34 +02:00
2009-12-16 07:19:57 -08:00
2010-01-06 19:47:10 +11:00
2010-04-07 08:38:05 -07:00
2009-12-17 07:23:42 -08:00
2010-01-27 09:20:03 -08:00
2010-02-22 16:15:17 -08:00
2010-03-03 08:47:22 -08:00
2010-04-27 12:53:28 -07:00
2010-02-22 16:21:02 -08:00
2010-03-12 15:52:42 -08:00
2010-03-12 15:52:42 -08:00
2010-03-03 07:34:18 -08:00
2010-04-05 09:39:11 -07:00
2010-05-11 08:31:49 +02:00
2010-01-17 21:52:11 +11:00
2010-04-02 14:30:39 -07:00
2010-02-24 08:30:08 +01:00
2010-05-17 21:37:40 +02:00
2010-01-13 10:51:39 +01:00
2010-05-10 23:08:19 +02:00
2010-05-10 23:09:30 +02:00
2010-05-10 23:08:15 +02:00
2010-03-06 21:28:37 +01:00
2009-12-15 17:35:26 -05:00
2010-04-24 11:31:25 -07:00
2010-03-12 15:53:11 -08:00
2010-01-15 16:59:21 -05:00
2010-04-03 14:56:02 -07:00
2010-03-26 11:33:55 +01:00
2009-12-17 11:46:01 +00:00
2010-05-21 19:30:44 +02:00
2010-05-21 19:30:45 +02:00
2010-04-09 10:12:03 -07:00
2010-02-08 18:19:41 -06:00
2010-05-21 09:37:30 -07:00
2010-02-10 17:47:17 -08:00
2010-05-18 09:28:04 -07:00
2010-02-25 09:41:02 +01:00
2010-05-03 15:53:54 -07:00
2010-05-10 16:53:55 -07:00
2010-05-18 08:27:54 -07:00
2010-05-18 08:27:54 -07:00
2010-03-12 15:52:44 -08:00
2010-05-21 18:31:19 -04:00
2010-03-05 13:25:52 -05:00
2010-05-21 18:31:19 -04:00
2010-01-04 11:33:58 +01:00
2010-02-26 20:39:09 +01:00
2010-03-02 14:28:49 -05:00
2010-04-27 13:06:35 -04:00
2010-03-06 11:26:27 -08:00
2010-05-11 10:09:47 +02:00
2010-03-12 15:52:28 -08:00
2010-03-12 15:53:10 -08:00
2010-05-11 14:40:55 +02:00
2010-03-13 01:21:21 +01:00
2009-12-15 08:53:26 -08:00
2010-05-18 08:27:54 -07:00
2010-05-06 10:56:07 +10:00
2009-12-16 07:20:10 -08:00
2010-02-22 15:45:54 -08:00
2010-05-21 11:08:05 -07:00
2010-03-23 17:19:30 +09:00
2010-04-13 23:27:41 -07:00
2010-05-13 18:42:25 +09:00
2010-04-26 15:50:50 +09:00
2010-04-15 13:13:52 +09:00
2009-12-16 12:16:49 -05:00
2010-03-12 15:52:44 -08:00
2010-05-17 17:18:50 -07:00
2010-04-09 10:09:50 -07:00
2009-12-20 10:17:59 +02:00
2009-12-16 07:20:04 -08:00
2010-04-22 12:37:07 +02:00
2010-03-06 11:26:32 -08:00
2010-04-03 15:09:04 -07:00
2010-04-06 23:53:30 -07:00
2009-12-16 22:32:29 -05:00
2010-03-13 01:21:21 +01:00
2010-05-10 11:08:35 -07:00
2010-04-14 04:49:51 -07:00
2010-05-08 17:12:33 +02:00
2010-01-14 22:38:09 -05:00
2010-03-12 15:52:36 -08:00
2010-03-22 13:12:33 -07:00
2010-05-15 23:28:39 -07:00
2010-03-07 17:04:47 -08:00
2010-05-21 09:37:31 -07:00
2010-02-04 14:20:41 +11:00
2010-04-13 23:26:02 -07:00
2010-03-30 22:02:32 +09:00
2010-05-03 23:50:42 -07:00
2010-02-18 15:43:09 -08:00
2010-05-09 19:35:27 +02:00
2009-12-16 07:20:00 -08:00
2010-04-13 12:43:42 +02:00
2010-04-06 21:50:02 +02:00
2010-03-23 17:19:38 +01:00
2010-05-12 23:02:23 -07:00
2010-05-12 23:02:23 -07:00
2010-01-21 13:39:03 +01:00
2009-12-16 07:20:08 -08:00
2010-05-05 11:46:17 -04:00
2010-03-02 14:55:11 -08:00
2010-03-12 15:52:43 -08:00
2010-05-21 09:34:29 -07:00
2010-05-17 07:57:27 -07:00
2010-01-07 11:58:36 -06:00
2010-05-20 13:21:50 -07:00
2010-03-01 22:21:58 +11:00
2010-01-15 01:43:29 -08:00
2010-05-11 16:07:59 -06:00
2010-05-11 16:07:59 -06:00
2010-05-11 16:07:59 -06:00
2010-05-19 12:58:37 -03:00
2010-03-13 08:57:28 -06:00
2010-02-24 14:22:08 +10:30
2010-02-24 14:22:26 +10:30
2010-04-08 09:46:19 +09:30
2010-03-13 08:57:29 -06:00
2010-01-05 09:17:33 +09:00
2010-03-19 07:17:52 -07:00
2010-05-20 21:26:12 -07:00
2010-03-23 16:50:26 -04:00
2010-03-12 10:03:42 +01:00
2010-05-21 18:31:18 -04:00
2010-02-22 16:19:45 -08:00
2010-05-17 21:37:42 +02:00