Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp410678ybd; Wed, 26 Jun 2019 00:00:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5/SYpFcIkMN36YzsLawz3JaevdbDs3um3jM133nt2X7CFQFuldHeozimZdO1Omz2ns9uK X-Received: by 2002:a17:90a:601:: with SMTP id j1mr2800492pjj.96.1561532403976; Wed, 26 Jun 2019 00:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561532403; cv=none; d=google.com; s=arc-20160816; b=nGWUjzMfT9ijhLUgl6dEO5LVgRNFYiwrFRqO/bEpVvwnHkO03THYKqwwscVJHfwUtV UoWN9gqqBdMrvDqcoKqOXQ0KGMFNPRSrjifcFLxZXZ4IhPVzwkWRo6lJJ04TUvCdANAs WD3I/M3jBQz+yuLsqSS1FJ/8RkGRjol/meWBSEsHHr/b85WexNKor+e2gHJC0Poq36qc bSHypJHJ4yaTBuFJOGrRhD9adgYiV+Y0FVwKBE5o+/E4l2tZMbryaw5yuObZ5ySYyYGG 5gpLZHcroamsVZURS7nDo/NtkAiha18x02LQk7NVdqTf9tUUUt67RyyBSXxXt4uNznpm MBUw== 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=9JZitHP6eJRgaj75NXXVVCbPBeJLVjtAlNYNgc56J5M=; b=jASGFuVYLi4ny37gDYx5xhCTE3RFW9ZxeIQ8DZLQdu2nu53+rdbHSP2q2Cdl19XqrN T4umatZmznN6CNSdNZULY3FzR1X7f3XFMzJRGeNkO0EsqbiBxTldzLJnYBZCVMoojpfW SerNS6yYJINLx0ipxGopW7ZGbGoYI4sv+4o1L1u84jeL1Fn7CodNpu/3AIz+WaFjqWj0 uWkTSmxoKs10e0FBo3m6hxEVa9bgwiuo0/kVLgeL6cKklMaZDKZU4OnlBZsUrxUyjMzd FTccDd1HJYGpAswHLeMoV1eR5lCEDhEwLMgLgX3rtCyZnf6BzRvNk9aSnqluh6Js6YpD +VmA== 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 c1si2552132plr.405.2019.06.25.23.59.47; Wed, 26 Jun 2019 00:00:03 -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 S1726756AbfFZG7k (ORCPT + 99 others); Wed, 26 Jun 2019 02:59:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:38682 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725876AbfFZG7j (ORCPT ); Wed, 26 Jun 2019 02:59:39 -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 94530AC83; Wed, 26 Jun 2019 06:59:38 +0000 (UTC) Date: Wed, 26 Jun 2019 08:59:35 +0200 From: Michal Hocko To: Alastair D'Silva Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Pavel Tatashin , Oscar Salvador , Mike Rapoport , Baoquan He , Qian Cai , Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 2/3] mm: don't hide potentially null memmap pointer in sparse_remove_one_section Message-ID: <20190626065935.GL17798@dhcp22.suse.cz> References: <20190626061124.16013-1-alastair@au1.ibm.com> <20190626061124.16013-3-alastair@au1.ibm.com> <20190626062344.GG17798@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 Wed 26-06-19 16:30:55, Alastair D'Silva wrote: > On Wed, 2019-06-26 at 08:23 +0200, Michal Hocko wrote: > > On Wed 26-06-19 16:11:22, Alastair D'Silva wrote: > > > From: Alastair D'Silva > > > > > > By adding offset to memmap before passing it in to > > > clear_hwpoisoned_pages, > > > we hide a potentially null memmap from the null check inside > > > clear_hwpoisoned_pages. > > > > > > This patch passes the offset to clear_hwpoisoned_pages instead, > > > allowing > > > memmap to successfully peform it's null check. > > > > Same issue with the changelog as the previous patch (missing WHY). > > > > The first paragraph explains what the problem is with the existing code > (same applies to 1/3 too). Under what conditions that happens? Is this a theoretical problem or can you hit this by a (buggy) code? Please be much more specific. -- Michal Hocko SUSE Labs