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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 42042ECE58E for ; Wed, 9 Oct 2019 14:24:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 118CD218AC for ; Wed, 9 Oct 2019 14:24:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 118CD218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B4BDF8E0006; Wed, 9 Oct 2019 10:24:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFCB98E0003; Wed, 9 Oct 2019 10:24:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A13018E0006; Wed, 9 Oct 2019 10:24:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0204.hostedemail.com [216.40.44.204]) by kanga.kvack.org (Postfix) with ESMTP id 7DD7F8E0003 for ; Wed, 9 Oct 2019 10:24:45 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 2BFE955FAD for ; Wed, 9 Oct 2019 14:24:45 +0000 (UTC) X-FDA: 76024467330.20.wound79_c40aafe9d250 X-HE-Tag: wound79_c40aafe9d250 X-Filterd-Recvd-Size: 2638 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Oct 2019 14:24:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADD4333027C; Wed, 9 Oct 2019 14:24:42 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5258D60BF4; Wed, 9 Oct 2019 14:24:36 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Alexey Dobriyan , Andrew Morton , "Aneesh Kumar K.V" , Anthony Yznaga , Dan Williams , Michal Hocko , Mike Rapoport , Naoya Horiguchi , Pankaj gupta , Qian Cai , Stephen Rothwell , Toshiki Fukasawa Subject: [PATCH v2 0/2] mm: Don't access uninitialized memmaps in PFN walkers Date: Wed, 9 Oct 2019 16:24:33 +0200 Message-Id: <20191009142435.3975-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 09 Oct 2019 14:24:42 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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: This is the follow-up of: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c We have multiple places where we might access uninitialized memmaps and trigger kernel BUGs. Make sure to only access initialized memmaps. Some of these places got easier to trigger with: [PATCH v6 00/10] mm/memory_hotplug: Shrink zones before removing memory As memmaps are now also poisoned when memory is offlined, before it is actually removed. v1 -> v2: - Drop ZONE_DEVICE support from the /proc/k... files as requested by Mich= al - Further simplify the code - Split up into two patches David Hildenbrand (2): mm: Don't access uninitialized memmaps in fs/proc/page.c mm/memory-failure.c: Don't access uninitialized memmaps in memory_failure() fs/proc/page.c | 28 ++++++++++++++++------------ mm/memory-failure.c | 14 ++++++++------ 2 files changed, 24 insertions(+), 18 deletions(-) --=20 2.21.0