Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5186771ybl; Tue, 27 Aug 2019 00:23:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqykF2m2kHW+KjSlut06L2Hyg3RUzhuhHJxcAPNRRFYMWpnKmb1YYgoZLLxrs4bR39bjXug2 X-Received: by 2002:a17:902:684f:: with SMTP id f15mr23228630pln.332.1566890630473; Tue, 27 Aug 2019 00:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566890630; cv=none; d=google.com; s=arc-20160816; b=LegcNIeUEtidzpoeZ3h2k+dOQuzEdU8tVPoXTUW9TVGEjRmJWrY+55oEvZSIrcTMpf HZvuTZuE4oGF4RRjO6q5wbRgKKAdw7qDp+ezWhaMko1yy6HKUYr6RDt7o+3fLD0pHt8E nUn+UX/GMRHG9w3SDWl50/k/sZc9dPZum92f+OnmEWi7pMeEB8Q0pZhw1ubWMWYm4CBf g6S5iUb/ctToy3DCYmkcdV4n/gA/DXQrrG70CD32ANnvBf/9boKVbqrSsstDgy9XnrsO u8cE79IQB2WkqGSHAHdlzDmmqLStem1vC7lkcW92zzBXLXRMHkSne8wuxZhVVlzQ5nHr LLGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7+rxfL+BGoYVdJ7xluCDH0CXoLyt6zVlZov1UL6jqEI=; b=qw/F0syMDwaV0JgLzNvgGBtJsa7iD1hX3NNF6X4Ss4gZ0MAeQwPkxsDXIil4To0YYB IYohBlEl6qiP/YTZLsrbhnhUCz5DzIMn+oNTe2qWGwPrYCfyZDpmU72LP8t2GJ2rrWkQ UgWc7NjduSroWvGDBvFXKbPjA956v6n+Jb3Iy0sTo82Qw/SNIL6RyMo2mIOFbSCkfp7g 5lfflCGnNwosVSmLd+GhrWiGgRGV53U3ZMtKz5rSxIw/fplQIGKs3jZq3ZgQJy5pxr6j 7eVIrHR6ROKueo94AbEaQZXZtJl/XKR43OTJh5qzaudOAuwQJ0b9QaPHBZnD2+mWgJlC kYGw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j187si11277821pge.591.2019.08.27.00.23.35; Tue, 27 Aug 2019 00:23:50 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726333AbfH0HWp (ORCPT + 99 others); Tue, 27 Aug 2019 03:22:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:41868 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725825AbfH0HWo (ORCPT ); Tue, 27 Aug 2019 03:22:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A0F24B087; Tue, 27 Aug 2019 07:22:43 +0000 (UTC) Date: Tue, 27 Aug 2019 09:22:42 +0200 From: Michal Hocko To: Alastair D'Silva Cc: Andrew Morton , Oscar Salvador , Mike Rapoport , Dan Williams , Wei Yang , David Hildenbrand , Qian Cai , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm: don't hide potentially null memmap pointer in sparse_remove_section Message-ID: <20190827072242.GT7538@dhcp22.suse.cz> References: <20190827053656.32191-1-alastair@au1.ibm.com> <20190827053656.32191-3-alastair@au1.ibm.com> <20190827062445.GO7538@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 27-08-19 17:00:16, Alastair D'Silva wrote: [...] > The NULL check was added in commit: > 95a4774d055c ("memory-hotplug: update mce_bad_pages when removing the > memory") > where memmap was originally inited to NULL, and only conditionally > given a value. > > With this in mind, since that situation is no longer true, I think we > could instead drop the NULL check. This would be much more preferable to the original patch. -- Michal Hocko SUSE Labs