From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDECCC433E1 for ; Wed, 26 Aug 2020 18:32:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 868B820786 for ; Wed, 26 Aug 2020 18:32:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="BN0eIlwP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 868B820786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C8EA6B0003; Wed, 26 Aug 2020 14:32:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0543A6B0005; Wed, 26 Aug 2020 14:32:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5D656B0006; Wed, 26 Aug 2020 14:32:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id CB5526B0003 for ; Wed, 26 Aug 2020 14:32:47 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 76D978248047 for ; Wed, 26 Aug 2020 18:32:47 +0000 (UTC) X-FDA: 77193565974.12.sink77_030e4cc27066 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 43EB81801EC47 for ; Wed, 26 Aug 2020 18:32:47 +0000 (UTC) X-HE-Tag: sink77_030e4cc27066 X-Filterd-Recvd-Size: 3765 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 18:32:46 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BDA320737; Wed, 26 Aug 2020 18:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598466765; bh=dKW3p0+FIdsZo0pp02NrFKF0GJ9Mzqfw7197P0JDbLo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BN0eIlwPFtRgsFXZiRZ4dkzN966igdj67++r1yWh2s3dzahd7l8vDcnRKgtLAz1Zt sA2Cg2LCCUu+jwFg+l8Wu4nNbGCNEo1zIggQeyjJuOM8Z7SktGz5NoDIEJClGIOk+9 RbZRc28aL4rr/izOCbU7ApBHdDg/bSSVUqX8LDA0= Date: Wed, 26 Aug 2020 11:32:45 -0700 From: Andrew Morton To: Joao Martins Cc: kernel test robot , Linux Memory Management List , Vishal L Verma , Dan Williams Subject: Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63 Message-Id: <20200826113245.8710d52e7539cb2b643f670c@linux-foundation.org> In-Reply-To: <6d57acf7-63cf-168d-f68e-67d88832f10f@oracle.com> References: <5f457d73.gsRq3vmXOfOBWd0d%lkp@intel.com> <20200825143218.7fc406bf642ad7f0cc9cfb26@linux-foundation.org> <6d57acf7-63cf-168d-f68e-67d88832f10f@oracle.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 43EB81801EC47 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 26 Aug 2020 17:13:12 +0100 Joao Martins wrote: > This should have been: Thanks. > > And also the MEMORY_HOTPLUG=n and ACPI=n build issues that Randy/you fixed which are > introduced by this series too. Just to confirm: I should add up all these fixes and respin > the series right? Or should I follow-up the first one on top of what you've already staged > in -mm tree? That's OK, I've been scooping up the fixes. https://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-introduce-default-phys_to_target_node-implementation-fix.patch https://ozlabs.org/~akpm/mmots/broken-out/device-dax-make-align-a-per-device-property-fix.patch and this one, From: Joao Martins Subject: device-dax-add-dis-contiguous-resource-support-fix kfree only with nr_range == 0, while also avoiding the leakage of @ranges (from krealloc success case with nr_ranges > 0) without the null deref that this introduces. Link: https://lkml.kernel.org/r/6d57acf7-63cf-168d-f68e-67d88832f10f@oracle.com Cc: Dan Williams Cc: Vishal Verma Signed-off-by: Andrew Morton --- drivers/dax/bus.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/drivers/dax/bus.c~device-dax-add-dis-contiguous-resource-support-fix +++ a/drivers/dax/bus.c @@ -607,13 +607,16 @@ static int alloc_dev_dax_range(struct de return -ENOMEM; alloc = __request_region(res, start, size, dev_name(dev), 0); - if (!alloc && !dev_dax->nr_range) { + if (!alloc) { /* - * If we adjusted an existing @ranges leave it alone, - * but if this was an empty set of ranges nothing else + * If this was an empty set of ranges nothing else * will release @ranges, so do it now. */ - kfree(ranges); + if (!dev_dax->nr_range) { + kfree(ranges); + ranges = NULL; + } + dev_dax->ranges = ranges; return -ENOMEM; } _