Message ID | 20170715012538.10101-85-alexander.levin@verizon.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1644554qge; Fri, 14 Jul 2017 18:29:35 -0700 (PDT) X-Received: by 10.84.232.5 with SMTP id h5mr18631873plk.261.1500082175485; Fri, 14 Jul 2017 18:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500082175; cv=none; d=google.com; s=arc-20160816; b=r1aWUcNF3HFk3aHePdwvtbfZlsy8dZENVyi/ajPFA7TW7k29CmssuJ5kI3A/nkiwjg fm/MbaHaGZwiW11kMHtwnJTmqi9oaBxZ8j7PlQ8jLCzrzapMM9M8/om+pT6enSRzVfNq sC7U4Q6KxpXAel2rPN9D/ag787XoDIOT5/rV+q40KVm8qM9C8Q5YiqcYgzkky70CZabf mO85G1uZWujIXGBFTfOcQNqUmi/jxcOi1YJoZnWQe/JeSCTFdUPF9DAAmtJbz1V5yYaf ELsqqHzxgOQxo5c+C/26Mq0XGA1t2Wt1vStOsnlEYDHwbSz9JSmziM6cDEYBjkRDANQl DDZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=aaKln6pxwwsPO7T6+DcAzaGutOthOsjunDsJmoEIJBM=; b=MjsY1AXyWyV+lgJWDMOrqiJNS0d7eGaIAFPoM0dNtP6ilAiSGEy+5z+4AUqJUkXM4f +mP3XyCyh3Ted3+QgzPEby5gww+35op26EBQYYis1hXoUnGG2vSY+OeSw1TfXi3pr/bP YSBzKVrJsw8ep7m4gbqg85o13YjQWQaabTY86eVNgN8laTfthv6fEma0wccF/bqj8tnE XX6RmbMf6RPSF5cqP7pEVO3mwFcOEv0kTPq5SQQ2pMD6P/eXlDtCirnOMZKFnPddw9wN rDaay9oJAv/sMj33DoYmBbnNBlprMkNniSp1S3guUXO7qNbOiu5M1j1uYB7QOTQjPRKI mbaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.b=TMnatgLp; dkim=fail header.i=@verizon.com header.b=vIpedP6Q; dkim=fail header.i=@verizon.com header.b=vIpedP6Q; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si7781072plj.559.2017.07.14.18.29.35; Fri, 14 Jul 2017 18:29:35 -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; dkim=pass header.i=@verizon.com header.b=TMnatgLp; dkim=fail header.i=@verizon.com header.b=vIpedP6Q; dkim=fail header.i=@verizon.com header.b=vIpedP6Q; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752564AbdGOB3b (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Fri, 14 Jul 2017 21:29:31 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:44101 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbdGOB2F (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2017 21:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1500082085; x=1531618085; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=J844v3HboFo3pYV5ZYibvF2OLJZgfjqFkJ/jIVAwVbs=; b=TMnatgLpBp0w50A64JyT7GwPO15rhOLJmrOt3zelQlfoxauWQmZBkV4a udcLMBObH9D2jsMP/NTkIKo/HjkuIGN1SDq0qifNQKRi4TlROJOP5VcNY sV6ijxygzOml1XgR9zfiFCl5SRAtEOuojPF75VHuniC7EeZ6a9Mmqylr8 8=; X-IronPort-Anti-Spam-Filtered: false Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe01.verizonbusiness.com with ESMTP; 15 Jul 2017 01:28:00 +0000 From: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>, Catalin Marinas <catalin.marinas@arm.com>, Hanjun Guo <hanjun.guo@linaro.org>, Yisheng Xie <xieyisheng1@huawei.com>, Robert Richter <rrichter@cavium.com>, James Morse <james.morse@arm.com>, Andrew Morton <akpm@linux-foundation.org>, "Linus Torvalds" <torvalds@linux-foundation.org>, "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Jul 2017 01:27:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1500082072; x=1531618072; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=J844v3HboFo3pYV5ZYibvF2OLJZgfjqFkJ/jIVAwVbs=; b=vIpedP6Q2g1CbI/P5a3MjO5rPjGs3xeU1iezKE/QyYiFO7m4l6EvC6gL cSj1hD5ucie5brBW4cFuW3PVxAk41cydT1CvbXPXuwLbBow9l8PcB+w+o WkeiiKzLuVwl+24Y2uT4EAr5eG3AHOgQiN7XP6lKC2vr0s68EGJRPANdY 8=; Received: from ranger.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.27]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Jul 2017 21:27:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1500082072; x=1531618072; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=J844v3HboFo3pYV5ZYibvF2OLJZgfjqFkJ/jIVAwVbs=; b=vIpedP6Q2g1CbI/P5a3MjO5rPjGs3xeU1iezKE/QyYiFO7m4l6EvC6gL cSj1hD5ucie5brBW4cFuW3PVxAk41cydT1CvbXPXuwLbBow9l8PcB+w+o WkeiiKzLuVwl+24Y2uT4EAr5eG3AHOgQiN7XP6lKC2vr0s68EGJRPANdY 8=; X-Host: ranger.odc.vzwcorp.com Received: from casac1exh003.uswin.ad.vzwcorp.com ([10.11.218.45]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 15 Jul 2017 01:27:51 +0000 Received: from scwexch16apd.uswin.ad.vzwcorp.com (153.114.130.35) by CASAC1EXH003.uswin.ad.vzwcorp.com (10.11.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 14 Jul 2017 18:27:50 -0700 Received: from OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) by scwexch16apd.uswin.ad.vzwcorp.com (153.114.130.35) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Fri, 14 Jul 2017 18:27:50 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Fri, 14 Jul 2017 20:27:48 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Fri, 14 Jul 2017 20:27:49 -0500 To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org> Subject: [PATCH for v4.9 LTS 85/87] mm: don't dereference struct page fields of invalid pages Thread-Topic: [PATCH for v4.9 LTS 85/87] mm: don't dereference struct page fields of invalid pages Thread-Index: AQHS/QlhW4HcSQaRTUqgy2uhzBt1QQ== Date: Sat, 15 Jul 2017 01:26:27 +0000 Message-ID: <20170715012538.10101-85-alexander.levin@verizon.com> References: <20170715012538.10101-1-alexander.levin@verizon.com> In-Reply-To: <20170715012538.10101-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 56df8c24689d..85881bf01776 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1875,14 +1875,14 @@ int move_freepages(struct zone *zone, #endif for (page = start_page; page <= end_page;) { - /* Make sure we are not inadvertently changing nodes */ - VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page); - if (!pfn_valid_within(page_to_pfn(page))) { page++; continue; } + /* Make sure we are not inadvertently changing nodes */ + VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page); + if (!PageBuddy(page)) { page++; continue;