Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp899715ybl; Wed, 11 Dec 2019 09:13:58 -0800 (PST) X-Google-Smtp-Source: APXvYqw3zBFnSCXNRN7j6O5gsVlVIZtYIVXc939VolpbtLGObbJBCq5kaS1ymdsyaVf8I2ZY9j3l X-Received: by 2002:aca:c507:: with SMTP id v7mr3602380oif.157.1576084438501; Wed, 11 Dec 2019 09:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576084438; cv=none; d=google.com; s=arc-20160816; b=HXa0siQDsyonZmUKCoAU+GQYxhP5bYvf911t/bWrDY63SL7uv5QBbuuxtW2IieF275 h5IUN9E1/tgk3F4EWTr0Kk7Qkk+638NargcWFNyMXJyesgLPh8XkpHhiM0upTiKil+5i k9rSJCkAcdJ8hyEuT1Sim+PMan7QxFmDneRm+oKN8VxjSr6rRFjU5iWKZyGcGarrBIgW pal4f0xsUQLJX51oGmYNcSmodmFs14lce6JAwEHQxPXoge6BQe1u+E7IZDOPuBkFSq+0 07vCLTv5QWbG/OiqWiVrWpeY2hzmXMiIFExLJcpb6K2Vt7REfG123+l8QpGh4y7FF/Da 6fJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=87+nbO7EsRQpe1wmSikO8vry0s4iwAAY074PAWZUn2w=; b=kC7ix8YeOBghLpE/+aLMzQOqjJjUwouMGZvjGNnsWLP7+0dl1gDNE+PwAMq3ngyMpJ pPOLzpcfoTo+5fa1dsnSCXZCCwqO55YZ1QjJwNwoX7rn5GASXqgK4HkuuWDYwI6QGAvj whHo3FlHg8LTiQT8IqJNCn3i7pkaA+F24QsrOBu9FE4yIVmSbNcs4P8r30PDIy7MV+qJ BsSwyMM/zkGMrq3W2m0ezyOpcf2KprzRfSFliGG1Si+zuIhaC/lZ8iBzNcaNu0pdmjfn yOLkBW8bsm/Zzp7WBN06H9OFCxHhCWJ9bSNy0ETd69O/LzMkOBKmZ4dGCsl1JWH/Jxs0 JPKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HcsFv2I+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10si1471849oib.88.2019.12.11.09.13.45; Wed, 11 Dec 2019 09:13:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HcsFv2I+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730899AbfLKRM4 (ORCPT + 99 others); Wed, 11 Dec 2019 12:12:56 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40998 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729512AbfLKRM4 (ORCPT ); Wed, 11 Dec 2019 12:12:56 -0500 Received: by mail-wr1-f65.google.com with SMTP id c9so24906997wrw.8 for ; Wed, 11 Dec 2019 09:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=87+nbO7EsRQpe1wmSikO8vry0s4iwAAY074PAWZUn2w=; b=HcsFv2I+5GpN8tthV67smYXfufVMlWaYkFgMpkaFzDGdfjp3TGIZLjlMspfT4yePt8 dFSnPi7iQLJduP3wwTLzsCAM9YhX++2smHKxYvO/dNtL0r/Cfx0wTLsJASTpLU33FaFd vV2cmdcUjYag4Yspdav4q6tvir6wnV5/6ZWzOCYOIEzS2dVUKOv+w6eTtgQxfZSIyIeI tY8Q3yuYWrKD7iczRVzQMwyU0sz8+NBZyQZj5hcREfBBKevQUlvjvfh2mRKNXC9eaaid HtqBvKiHPHM4TD/9eJI85G//q4Q5ANEs2JUVrHz+jwzjo7KLz3C4KxqzjOSCx9RpkIFM jWWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=87+nbO7EsRQpe1wmSikO8vry0s4iwAAY074PAWZUn2w=; b=Fu7JxZsfeCf00OWFha/Dnnt9EE4glCwehb2mSkeQyBVeKg5DgwOcvHGTwi4EBbCW9C aht1uos7K+6Vr6GM60Lb+Qh/X6j5jys2sVX0u4kFmNTo6Y2r8xzG8KH2QCfFQa48WP/q 27CclF8g86cVlWPBZqv5Y8daVikzj4yWqUVGUSs5FPPnvbdMqFdkuQHdm69PyZ2eFb6F 24P5oegwBZN7RyYZaY39s2WeswvoR5zSY6A9N7txBICLlCihnkRL/bkQYFOTg857SF6a 7KW8Qp0xr3UhWg4laG2wHyhqiBQb0YjdRwoCedvA3SLXW4rCE4IEVqPPZRArV3avWJNk jAAQ== X-Gm-Message-State: APjAAAVHyZO/WEGpKgKG1gL6bJnG691Yt3LmiWJQ+oiIHeI05h5+ppVw X8FWAhmz6pIqNwlKrj8HOPr+37pa X-Received: by 2002:adf:df03:: with SMTP id y3mr996018wrl.260.1576084374686; Wed, 11 Dec 2019 09:12:54 -0800 (PST) Received: from ltop.local ([2a02:a03f:40f6:4600:d98a:4956:14c2:2b5d]) by smtp.gmail.com with ESMTPSA id 2sm2973189wrq.31.2019.12.11.09.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 09:12:53 -0800 (PST) Date: Wed, 11 Dec 2019 18:12:52 +0100 From: Luc Van Oostenryck To: Steven Price Cc: kbuild test robot , Mark Rutland , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-mm@kvack.org, "H. Peter Anvin" , Will Deacon , "Liang, Kan" , x86@kernel.org, Ingo Molnar , Arnd Bergmann , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kbuild-all@lists.01.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Andrew Morton Subject: Re: [PATCH v16 13/25] mm: pagewalk: Don't lock PTEs for walk_page_range_novma() Message-ID: <20191211171252.fdbdqn2nrze637gm@ltop.local> References: <20191206135316.47703-14-steven.price@arm.com> <201912101842.KIXI4yCg%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 03:54:06PM +0000, Steven Price wrote: > On 10/12/2019 11:23, kbuild test robot wrote: > >>> include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'walk_pte_range' - unexpected unlock > > I believe this is a false positive (although the trace here is useless). > This patch adds a conditional lock/unlock: > > pte = walk->no_vma ? pte_offset_map(pmd, addr) : > pte_offset_map_lock(walk->mm, pmd, addr, &ptl); > ... > if (!walk->no_vma) > spin_unlock(ptl); > pte_unmap(pte); > > I'm not sure how to match sparse happy about that. Is the only option to > have two versions of the walk_pte_range() function? One which takes the > lock and one which doesn't. Yes. -- Luc