From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?UTF-8?Q?Jan_H._Sch=c3=b6nherr?=" Subject: Re: [PATCH] dax: Release PMD lock even when there is no PMD support in DAX Date: Thu, 18 Jan 2018 15:35:32 +0100 Message-ID: References: <20180118133839.20587-1-jschoenh@amazon.de> <20180118140739.GA28322@bombadil.infradead.org> <20180118142207.GB28322@bombadil.infradead.org> <62c74e2b-1342-8a8c-f1a8-7daa285e6a0f@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Matthew Wilcox , Ross Zwisler , linux-fsdevel@vger.kernel.org To: Matthew Wilcox Return-path: Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:56884 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756384AbeAROfq (ORCPT ); Thu, 18 Jan 2018 09:35:46 -0500 In-Reply-To: <62c74e2b-1342-8a8c-f1a8-7daa285e6a0f@amazon.de> Content-Language: en-US Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 01/18/2018 03:27 PM, Jan H. Schönherr wrote: > It would still skip the unlock, in case pmdp is !=NULL (and locked) after follow_pte_pmd(). > So it wouldn't address, what I intended to address with the patch. Small correction: we'd take the "else" branch, which would do some stuff it's not supposed to do when follow_pte_pmd() returns with pmdp!=NULL. And we'd actually do a unlock, but thinking it's a PTE, not a PMD. So, defensive-wise, may point still stands, that we're not correctly handling an unexpectedly returned PMD entry. Regards Jan