Re: dio_get_page() lockdep complaints

From: Zach Brown
Date: Fri Nov 09 2007 - 12:30:27 EST



So, reiserfs and NFS are nesting i_mutex inside the mmap_sem.

>> [<b038c6e5>] mutex_lock+0x1c/0x1f
>> [<b01b17e9>] reiserfs_file_release+0x54/0x447
>> [<b016afe7>] __fput+0x53/0x101
>> [<b016b0ee>] fput+0x19/0x1c
>> [<b015bcd5>] remove_vma+0x3b/0x4d
>> [<b015c659>] do_munmap+0x17f/0x1cf

> [<ffffffff802686a1>] _mutex_lock+0x28/0x34
> [<ffffffff883e71d0>] nfs_revalidate_mapping+0x6d/0xac [nfs]
> [<ffffffff883e4b51>] nfs_file_mmap+0x5c/0x74 [nfs]
> [<ffffffff8020df7e>] do_mmap_pgoff+0x51a/0x817
> [<ffffffff80225d19>] sys_mmap+0x90/0x119

I think i_mutex is fundamentally nested outside of the mmap_sem because
of faulting in the buffered write path. I think these warnings could be
reproduced with a careful test app which tries buffered writes from an
address which will fault.

DIO just tripped it up because it *always* performs get_user_pages() on
the memory.

So reiser and NFS need to be fixed. No?

(reiser is grabbing i_mutex from any final fput? brave!)

- z
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/