Received: by 10.223.185.116 with SMTP id b49csp307300wrg; Fri, 2 Mar 2018 19:53:49 -0800 (PST) X-Google-Smtp-Source: AG47ELtRiZRR73NWQbNUieaMgwy50mTloiowBL8nRigJSBh3cU49QVx3U5aKRpgmfqlzVIzhlsOt X-Received: by 2002:a17:902:8605:: with SMTP id f5-v6mr7093552plo.120.1520049229051; Fri, 02 Mar 2018 19:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520049229; cv=none; d=google.com; s=arc-20160816; b=SzD39Z0Lu79aPgViYtNZvoeDfmKv5b31wg/DN9wDv82R3FAd03jroqH4knOeQ5VeDC z6wexiBGdDlJCz8p+nHI6Pt6bTcrvMLfp7E6IC2SMpl03MOzNpMTunVFM+WSMQKyVdCH WQawg5qC5A0KkwcniQBBHhGUARmdPyPV6paMRB68/DML/3bIcLg3Top0SSMAbEMCy+Pf 783PzVDQ5Yl/wtFXuq2nnIHX9aj6PPPZnyIqLcYzh8/3V/WHdQJ/E9hMKP2B2vKJhSzD u9uNxJ6AhRspx/pWTsN1OWrqNpdjeXiwEvnJX6ESIytp2GxaO+O9rNfphyyaYGLSFb4v FpUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Gjnb8RUhOTODsB7dyEhsErJphvnU96EPcf2VbBbVKlw=; b=GTDqtQWkiRUJbxr+UjtpbDSWWnzvgposCgRstfiIV4Kvl/9sa7XbxnqAY+gGebV1mH fD0XzViQOui4osS8cwbYZfgxEg1Gm7uEubN8PorAFHnnGJT4DbrXsB4GLic+agmpriXA ysXhuKv4IFhVuF5oZG0nwloP0KjdtmfhmzcmweJPv1iRWL85/rY0voutWp90gNGclP2I 13ncnBaSGYdOS2uJmHJXvWh8Etm/EYjR9avqKnhz4bNDyrnE0JLASFHvxO8/vc1QpDAd ymCR0WG5X0Qh0TAqGOvWdxcucBfQXRG6YDolghOT3kLHA9520fONwcN8I34l9kc0fFkP ls0Q== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l64si962422pgl.485.2018.03.02.19.53.34; Fri, 02 Mar 2018 19:53:49 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935257AbeCCAMs (ORCPT + 99 others); Fri, 2 Mar 2018 19:12:48 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57946 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935239AbeCCAMp (ORCPT ); Fri, 2 Mar 2018 19:12:45 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F12EB40FB65E; Sat, 3 Mar 2018 00:12:44 +0000 (UTC) Received: from slurm.brq.redhat.com (unknown [10.40.205.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD07C2156601; Sat, 3 Mar 2018 00:12:42 +0000 (UTC) From: Daniel Vacek To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Paul Burton , Daniel Vacek , stable@vger.kernel.org Subject: [PATCH v3 0/2] mm/page_alloc: fix kernel BUG at mm/page_alloc.c:1913! crash in move_freepages() Date: Sat, 3 Mar 2018 01:12:24 +0100 Message-Id: In-Reply-To: <1519908465-12328-1-git-send-email-neelx@redhat.com> References: <1519908465-12328-1-git-send-email-neelx@redhat.com> In-Reply-To: <1519908465-12328-1-git-send-email-neelx@redhat.com> References: <1519908465-12328-1-git-send-email-neelx@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 03 Mar 2018 00:12:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 03 Mar 2018 00:12:45 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'neelx@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kernel can crash on failed VM_BUG_ON assertion in function move_freepages() on some rare physical memory mappings (with huge range(s) of memory reserved by BIOS followed by usable memory not aligned to pageblock). crash> page_init_bug -v | grep resource | sed '/RAM .3/,/RAM .4/!d' 4bfac000 - 646b1fff System RAM (391.02 MiB = 400408.00 KiB) 646b2000 - 793fefff reserved (333.30 MiB = 341300.00 KiB) 793ff000 - 7b3fefff ACPI Non-volatile Storage ( 32.00 MiB) 7b3ff000 - 7b787fff ACPI Tables ( 3.54 MiB = 3620.00 KiB) 7b788000 - 7b7fffff System RAM (480.00 KiB) More details in second patch. v2: Use -1 constant for max_pfn and remove the parameter. That's mostly just a cosmetics. v3: Split to two patches series to make clear what is the actual fix and what is just a clean up. No code changes compared to v2 and second patch is identical to original v1. Cc: stable@vger.kernel.org Daniel Vacek (2): mm/memblock: hardcode the max_pfn being -1 mm/page_alloc: fix memmap_init_zone pageblock alignment mm/memblock.c | 13 ++++++------- mm/page_alloc.c | 9 +++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) -- 2.16.2