Received: by 10.223.176.46 with SMTP id f43csp207609wra; Fri, 19 Jan 2018 16:18:33 -0800 (PST) X-Google-Smtp-Source: AH8x2242F1xVW8ag+97kOn0Nm1gNtQqdAQcmM/LCNUeKYIeYMZwPV3DJ9bbKlDjg6ZCMeUUn2KcL X-Received: by 10.98.30.1 with SMTP id e1mr289270pfe.37.1516407513459; Fri, 19 Jan 2018 16:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516407513; cv=none; d=google.com; s=arc-20160816; b=p08C7jPhsCFUXyoUaUzgp6zP9RM3RQobCWyxFPYkmgyIMNYls9DMzCZSXAi16PWbx3 rZNn8CuAx94XLmxC8fAAWHfC3VPfooPfO9x6xeHk2JM5jRA6gtnR5sHOOWLBmczq95pL XpuStRRftGW5btEcfEo2pzO4iUI3eBFBazYAlrzpEdNa/mfmNnhyLrl4bRtx/f6LuCnz xLt0+svbx2Pvy9hM4poZH4F7S4XRJ+9+w/4Wf/bh5SV1xMVh4CRYyp28pJZSCigExuLq rH81JpVEs1HwdnUrwY87G1+IR4kEBM815AJAanftpDxJTBtA8GlxbMXZHcm7dtZApusn rjjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=kdxD7yI0u4IyKmPcYBhaCu+zz6PMh9DpPvI8KEZnLQ0=; b=uL66z9UTCFLH+oDWpvQ2ioLj3cjXaKUvi1siwVwxURvKem3kby5bJUu8YB4zd682YO pEmoRXx9mop1P80lrIjeIZco1bLnfmNKpXiwmva/FnjmgRS2bR1Xqymrv66jUWhGvJXu ZzOcvRm84FP0eGKT65mWjCspoo/FgrgHkBFqQ0KREqyPW6lNBsC3nUh1ZO9wWkVNzlqQ dWLfFB/f2TJQhdJuS7EJUpJZ0Rv6QXVFuC7sE8bKeI44bqY7xK9RpmDRkwfjCyvEp9z9 E95ISmVf3A488CmVJ2gCo5QrdZRNFwSkvZGZumrfN04/Yxf9fql6M9WY9uQw/XZyVNoJ ytwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=oyDmYRFf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u88si10143987pfg.324.2018.01.19.16.18.19; Fri, 19 Jan 2018 16:18:33 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=oyDmYRFf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756330AbeATAP6 (ORCPT + 99 others); Fri, 19 Jan 2018 19:15:58 -0500 Received: from mail-ot0-f171.google.com ([74.125.82.171]:39307 "EHLO mail-ot0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbeATAPy (ORCPT ); Fri, 19 Jan 2018 19:15:54 -0500 Received: by mail-ot0-f171.google.com with SMTP id d9so2875716oth.6 for ; Fri, 19 Jan 2018 16:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kdxD7yI0u4IyKmPcYBhaCu+zz6PMh9DpPvI8KEZnLQ0=; b=oyDmYRFfNp9kCr8q7x8vTgcp9ES2af67A4jIc9t7yfsEibJG1e/+F8bjwKR2mHrztR BuZ/NuxgpnlG1ayNRovIobQ0qRYBK3UpW8TTIDiXgwf1ivG4StPzauBJy4OyrThdWIRI 1/NIVZAg9RjKQYZLNyXsgZeHSsGgfXsFz17Gm/nrUkjlbCQ/9he7C24EzVRbuh2mb3zz 7dWzK5IsnmYEutdjRZGGqhScmBcm/0ok7LQT+B1koaEHeA6Y6dprSETkANfXf0V/M9Mp 6A5jaEtgxYf9o2/pIjOUrtgfilAWf83UjPWJcEJ5ZZVD4xjobL+3aHrJKMCubNxHgB4s j7vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kdxD7yI0u4IyKmPcYBhaCu+zz6PMh9DpPvI8KEZnLQ0=; b=XE+Uv9deEd5sEfmp1c306dU+9w6B24f+bXm6dKrsL0LWjahEKO6qR8/BobU3Po6SM5 /v3zfjzHCLxjY5H1xtUWyDo8MUmo9EQHy09TQ/QfSwxpHv6Sze65VyV8yazbAgtI/9Hs qOtl19v2MQfa9kfWsPavigwfoJAF/4l4nAsrDstruHEM+8l/Ze4cfFP7u8B8DGwgAXno 8U/kUvlpKSG8Q9AA5FC9x31nd6OXFwNSBhAZYioYfsfBck1M2d+tugiPTgwNvKI5+f77 3xrC9XF3an4o79OJw6sPbClgySazV24iIVyRw9D+BQD+6THKmZZoUSHjoAOYBCzN/4A5 ocMQ== X-Gm-Message-State: AKwxytdBWbrC3KbDhzeovIhPSQTMNvclzc6mZ/EVoP6n/i7ljeOu1Tk7 YUmouAKsksXwSdROtFvSkJzrAEJ71GmSnJ4PWZhAOjuh X-Received: by 10.157.0.102 with SMTP id 93mr138699ota.175.1516407354029; Fri, 19 Jan 2018 16:15:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.62.72 with HTTP; Fri, 19 Jan 2018 16:15:53 -0800 (PST) In-Reply-To: <20180118000602.5527-2-jschoenh@amazon.de> References: <20180118000602.5527-1-jschoenh@amazon.de> <20180118000602.5527-2-jschoenh@amazon.de> From: Dan Williams Date: Fri, 19 Jan 2018 16:15:53 -0800 Message-ID: Subject: Re: [PATCH 2/2] mm: Fix devm_memremap_pages() collision handling To: =?UTF-8?Q?Jan_H=2E_Sch=C3=B6nherr?= Cc: Andrew Morton , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 17, 2018 at 4:06 PM, Jan H. Sch=C3=B6nherr = wrote: > If devm_memremap_pages() detects a collision while adding entries > to the radix-tree, we call pgmap_radix_release(). Unfortunately, > the function removes *all* entries for the range -- including the > entries that caused the collision in the first place. > > Modify pgmap_radix_release() to take an additional argument to > indicate where to stop, so that only newly added entries are removed > from the tree. > > Fixes: 9476df7d80df ("mm: introduce find_dev_pagemap()") > Signed-off-by: Jan H. Sch=C3=B6nherr Looks good to me, applied for 4.16.