public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zach Brown <zach.brown@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-aio@kvack.org, Trond Myklebust <trond.myklebust@fys.uio.no>,
	Chris Mason <chris.mason@oracle.com>
Subject: Re: dio_get_page() lockdep complaints
Date: Fri, 09 Nov 2007 09:30:20 -0800	[thread overview]
Message-ID: <4734992C.7000408@oracle.com> (raw)
In-Reply-To: <1194627742.6289.175.camel@twins>


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

  reply	other threads:[~2007-11-09 17:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-19  7:38 dio_get_page() lockdep complaints Jens Axboe
2007-04-19  8:01 ` Andrew Morton
2007-04-19  8:01   ` Jens Axboe
2007-04-19  8:25     ` Andrew Morton
2007-04-19  8:34       ` Jens Axboe
2007-04-19 12:43         ` Vladimir V. Saveliev
2007-04-19 12:49           ` Jens Axboe
2007-04-19 12:52             ` Jens Axboe
2007-04-19 13:53               ` Roland Dreier
2007-04-19 14:20                 ` Jens Axboe
2007-04-19 14:15         ` Jens Axboe
2007-04-19 14:55           ` Vladimir V. Saveliev
2007-04-19 14:57       ` Vladimir V. Saveliev
2007-04-19 16:42         ` Andrew Morton
2007-04-19 14:36   ` Chris Mason
2007-11-09 17:02 ` Peter Zijlstra
2007-11-09 17:30   ` Zach Brown [this message]
2007-11-09 17:45     ` Trond Myklebust
2007-11-09 17:48       ` Zach Brown
2007-11-09 18:01         ` Chris Mason
2007-11-09 18:35           ` Zach Brown
2007-11-09 18:53             ` Chris Mason
2007-11-09 18:57               ` Chris Mason
2007-11-09 19:16                 ` Zach Brown
2007-11-09 19:35                   ` Chris Mason
2007-11-11 19:49       ` Peter Zijlstra
2007-11-12  8:45         ` Martin Schwidefsky
2007-11-12  9:27           ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4734992C.7000408@oracle.com \
    --to=zach.brown@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox