[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c45c769-2f5e-9327-c39e-1df7744fa633@intel.com>
Date: Wed, 17 May 2017 10:33:58 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Ross Zwisler <ross.zwisler@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Cc: "Darrick J. Wong" <darrick.wong@...cle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@....de>,
Dan Williams <dan.j.williams@...el.com>,
Jan Kara <jack@...e.cz>,
Matthew Wilcox <mawilcox@...rosoft.com>,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-nvdimm@...ts.01.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Pawel Lebioda <pawel.lebioda@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Xiong Zhou <xzhou@...hat.com>, Eryu Guan <eguan@...hat.com>,
stable@...r.kernel.org
Subject: Re: [PATCH 1/2] mm: avoid spurious 'bad pmd' warning messages
On 05/17/2017 10:16 AM, Ross Zwisler wrote:
> @@ -3061,7 +3061,7 @@ static int pte_alloc_one_map(struct vm_fault *vmf)
> * through an atomic read in C, which is what pmd_trans_unstable()
> * provides.
> */
> - if (pmd_trans_unstable(vmf->pmd) || pmd_devmap(*vmf->pmd))
> + if (pmd_devmap(*vmf->pmd) || pmd_trans_unstable(vmf->pmd))
> return VM_FAULT_NOPAGE;
I'm worried we are very unlikely to get this right in the future. It's
totally not obvious what the ordering requirement is here.
Could we move pmd_devmap() and pmd_trans_unstable() into a helper that
gets the ordering right and also spells out the ordering requirement?
Powered by blists - more mailing lists