Peter Zijlstra
14358e6dda
lockdep: annotate dir vs file i_mutex
...
On Mon, 2007-09-24 at 22:13 -0400, Steven Rostedt wrote:
> The circular lock seems to be this:
>
> #1 :
>
> sys_mmap2: down_write(&mm->mmap_sem);
> nfs_revalidate_mapping: mutex_lock(&inode->i_mutex);
>
>
> #0 :
>
> vfs_readdir: mutex_lock(&inode->i_mutex);
> - during the readdir (filldir64), we take a user fault (missing page?)
> and call do_page_fault -
> do_page_fault: down_read(&mm->mmap_sem);
>
>
> So it does indeed look like a circular locking. Now the question is, "is
> this a bug?". Looking like the inode of #1 must be a file or something
> else that you can mmap and the inode of #0 seems it must be a directory.
> I would say "no".
>
> Now if you can readdir on a file or mmap a directory, then this could be
> an issue.
>
> Otherwise, I'd love to see someone teach lockdep about this issue! ;-)
Make a distinction between file and dir usage of i_mutex.
The inode should be complete and unused at unlock_new_inode(), re-init
i_mutex depending on its type.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
2007-10-14 01:38:33 +02:00
..
2007-10-09 19:59:16 -07:00
2007-09-24 07:15:48 +02:00
2007-10-13 14:36:18 +01:00
2007-10-10 16:53:40 -07:00
2007-09-23 22:17:27 +02:00
2007-10-10 16:51:36 -07:00
2007-10-10 16:53:11 -07:00
2007-10-12 14:55:34 -07:00
2007-09-11 04:22:16 -07:00
2007-10-14 12:41:51 -07:00
2007-10-10 16:51:59 -07:00
2007-10-12 14:55:45 -04:00
2007-10-10 16:49:02 -07:00
2007-10-11 22:24:13 +01:00
2007-10-10 09:25:57 +02:00
2007-10-12 12:40:38 +02:00
2007-10-12 12:50:07 +02:00
2007-10-14 22:57:45 +02:00
2007-10-10 21:15:29 -07:00
2007-08-31 01:42:22 -07:00
2007-10-04 18:40:57 -04:00
2007-10-10 16:55:42 -07:00
2007-10-10 16:54:36 -07:00
2007-10-12 14:51:03 -07:00
2007-10-12 14:51:01 -07:00
2007-10-09 20:22:20 -04:00
2007-10-10 16:53:56 -07:00
2007-09-19 15:12:19 +10:00
2007-10-10 16:52:52 -07:00
2007-10-10 16:48:08 -07:00
2007-10-10 16:54:03 -07:00
2007-10-14 01:38:33 +02:00
2007-10-10 08:55:27 +01:00
2007-10-14 12:41:51 -07:00
2007-10-14 14:47:56 +02:00
2007-10-14 14:47:26 +02:00
2007-08-31 01:42:23 -07:00
2007-10-09 22:56:30 -04:00
2007-10-13 23:56:32 +02:00
2007-10-09 22:07:51 -03:00
2007-10-13 23:56:33 +02:00
2007-10-13 17:47:51 +02:00
2007-10-10 16:52:59 -07:00
2007-10-10 16:51:59 -07:00
2007-10-10 16:49:10 -07:00
2007-10-10 16:51:16 -07:00
2007-10-10 16:52:52 -07:00
2007-10-10 16:49:13 -07:00
2007-08-26 18:35:42 -07:00
2007-10-10 16:52:04 -07:00
2007-10-10 16:52:52 -07:00
2007-10-10 16:51:16 -07:00
2007-10-10 16:49:10 -07:00
2007-10-14 12:41:52 -07:00
2007-10-10 16:49:21 -07:00
2007-10-10 16:54:58 -07:00
2007-10-14 13:40:02 +02:00
2007-10-10 16:55:55 -07:00
2007-09-16 21:13:58 -07:00
2007-10-10 16:54:57 -07:00
2007-10-09 22:07:28 -03:00
2007-10-09 22:07:23 -03:00
2007-10-11 22:11:12 +02:00
2007-10-12 23:04:23 +02:00
2007-08-22 19:52:45 -07:00
2007-08-26 18:35:34 -07:00
2007-10-12 12:40:38 +02:00
2007-09-04 23:16:04 -04:00
2007-10-12 14:51:12 -07:00
2007-10-10 16:48:12 -07:00
2007-10-13 10:18:29 +02:00
2007-09-11 22:24:45 +01:00
2007-10-12 14:55:47 -04:00
2007-10-10 16:51:35 -07:00
2007-10-11 22:11:12 +02:00
2007-09-21 15:55:55 +09:00
2007-10-10 16:54:03 -07:00
2007-09-19 11:24:18 -07:00
2007-08-22 19:52:45 -07:00
2007-08-22 19:52:47 -07:00
2007-10-13 23:56:29 +02:00
2007-10-11 22:11:12 +02:00
2007-10-10 16:49:07 -07:00
2007-10-13 09:52:26 -07:00
2007-09-11 11:28:26 +02:00
2007-10-10 21:15:29 -07:00
2007-10-10 16:48:06 -07:00
2007-09-01 10:14:54 -04:00
2007-10-10 16:52:14 -07:00
2007-10-10 16:49:04 -07:00
2007-08-17 11:01:58 +10:00
2007-10-12 15:50:23 -07:00
2007-10-12 15:03:18 -07:00
2007-10-12 15:03:18 -07:00
2007-10-10 16:53:50 -07:00
2007-10-10 16:53:55 -07:00
2007-10-10 16:49:20 -07:00
2007-10-12 14:51:07 -07:00
2007-08-25 16:58:27 +10:00
2007-09-11 17:21:20 -07:00
2007-10-10 16:49:22 -07:00
2007-10-11 22:11:12 +02:00
2007-10-14 12:41:52 -07:00
2007-10-10 16:54:11 -07:00
2007-10-10 21:22:05 -07:00
2007-10-10 16:53:30 -07:00
2007-10-10 16:51:28 -07:00
2007-10-14 12:41:51 -07:00
2007-08-22 19:52:45 -07:00
2007-08-22 19:52:47 -07:00
2007-10-10 16:55:33 -07:00
2007-08-22 19:52:44 -07:00
2007-09-20 13:19:59 -07:00
2007-09-16 16:21:16 -07:00
2007-08-31 01:09:21 -07:00
2007-10-10 16:52:39 -07:00
2007-10-14 12:41:51 -07:00
2007-10-10 09:25:57 +02:00
2007-10-12 14:51:12 -07:00
2007-10-11 17:36:13 -07:00
2007-08-02 17:41:40 +02:00
2007-10-12 14:51:09 -07:00
2007-10-12 14:55:34 -07:00
2007-09-19 11:24:18 -07:00
2007-10-12 14:51:04 -07:00
2007-10-09 22:07:04 -03:00
2007-10-10 09:25:57 +02:00
2007-10-12 14:05:17 +10:00
2007-10-10 16:53:57 -07:00