linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan H. Schönherr" <jschoenh@amazon.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Matthew Wilcox <mawilcox@microsoft.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dax: Release PMD lock even when there is no PMD support in DAX
Date: Thu, 18 Jan 2018 15:22:58 +0100	[thread overview]
Message-ID: <5c50be9f-0ade-41ae-e137-0171ed1ef924@amazon.de> (raw)
In-Reply-To: <20180118140739.GA28322@bombadil.infradead.org>

On 01/18/2018 03:07 PM, Matthew Wilcox wrote:
> On Thu, Jan 18, 2018 at 02:38:39PM +0100, Jan H. Schönherr wrote:
>> The function follow_pte_pmd() can theoretically return after having
>> acquired a PMD lock, even when DAX was not compiled with
>> CONFIG_FS_DAX_PMD.
> 
> I don't think it can.  How would a PMD entry get into a DAX VMA if we
> compiled the kernel without CONFIG_FS_DAX_PMD?
> 

Maybe it can not in happy cases. But the PMD parts in follow_pte_pmd() are compiled in
unconditionally. So, if there's an issue elsewhere, and for some weird reason we get a PMD entry
in the page table, it would screw the lock balance.

I haven't run into an actual issue with this, it's just supposed to be defensive.

Regards
Jan

  parent reply	other threads:[~2018-01-18 14:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 13:38 [PATCH] dax: Release PMD lock even when there is no PMD support in DAX Jan H. Schönherr
2018-01-18 14:07 ` Matthew Wilcox
2018-01-18 14:22   ` Matthew Wilcox
2018-01-18 14:27     ` Jan H. Schönherr
2018-01-18 14:35       ` Jan H. Schönherr
2018-01-18 14:22   ` Jan H. Schönherr [this message]
2018-01-18 16:20 ` Ross Zwisler
2018-01-25 16:34   ` Ross Zwisler
2018-01-25 21:29     ` Jan H. Schönherr

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=5c50be9f-0ade-41ae-e137-0171ed1ef924@amazon.de \
    --to=jschoenh@amazon.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).