From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Ross Zwisler" <ross.zwisler@linux.intel.com>,
"Jan H. Schönherr" <jschoenh@amazon.de>,
"Matthew Wilcox" <mawilcox@microsoft.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dax: Release PMD lock even when there is no PMD support in DAX
Date: Thu, 25 Jan 2018 09:34:08 -0700 [thread overview]
Message-ID: <20180125163408.GA10655@linux.intel.com> (raw)
In-Reply-To: <20180118162013.GB21971@linux.intel.com>
On Thu, Jan 18, 2018 at 09:20:13AM -0700, Ross Zwisler 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.
> >
> > Release the PMD lock unconditionally.
> >
> > Fixes: f729c8c9b24f ("dax: wrprotect pmd_t in dax_mapping_entry_mkclean")
> > Signed-off-by: Jan H. Sch�nherr <jschoenh@amazon.de>
> > ---
> > fs/dax.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/dax.c b/fs/dax.c
> > index 9598159..c2ebf10 100644
> > --- a/fs/dax.c
> > +++ b/fs/dax.c
> > @@ -636,8 +636,8 @@ static void dax_mapping_entry_mkclean(struct address_space *mapping,
> > pmd = pmd_mkclean(pmd);
> > set_pmd_at(vma->vm_mm, address, pmdp, pmd);
> > unlock_pmd:
> > - spin_unlock(ptl);
> > #endif
> > + spin_unlock(ptl);
> > } else {
> > if (pfn != pte_pfn(*ptep))
> > goto unlock_pte;
>
> Sure, this seems fine to me. This seems simple and correct - you're right
> that we aren't taking the PTL on the PMD conditionally based on whether
> CONFIG_DAX_PMD is defined, so it doesn't make sense to release it
> conditionally. I think if we ever hit this lock imbalance we're totally
> insane anyway, but it the fix is correct and doesn't mess with our code flow.
>
> You can add:
> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Ah, I just realized that this patch didn't CC Andrew, and he's the one that
usually takes our DAX patches.
Andrew, can you pick this up? Here's the fsdevel patchwork:
https://patchwork.kernel.org/patch/10173255/
Thanks,
- Ross
next prev parent reply other threads:[~2018-01-25 16:34 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
2018-01-18 16:20 ` Ross Zwisler
2018-01-25 16:34 ` Ross Zwisler [this message]
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=20180125163408.GA10655@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=jschoenh@amazon.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mawilcox@microsoft.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.