From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752091AbbCQCXo (ORCPT ); Mon, 16 Mar 2015 22:23:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48798 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbbCQCXn (ORCPT ); Mon, 16 Mar 2015 22:23:43 -0400 Message-ID: <55079005.9000307@redhat.com> Date: Mon, 16 Mar 2015 22:23:01 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Laura Abbott , Joonsoo Kim , Vlastimil Babka , Gioh Kim CC: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Naoya Horiguchi , Mel Gorman , Yasuaki Ishimatsu , Zhang Yanfei , Xishi Qiu , Vladimir Davydov , Michal Nazarewicz , Marek Szyprowski Subject: Re: [PATCH] mm/page_alloc: Call kernel_map_pages in unset_migrateype_isolate References: <1426530585-11367-1-git-send-email-lauraa@codeaurora.org> In-Reply-To: <1426530585-11367-1-git-send-email-lauraa@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/16/2015 02:29 PM, Laura Abbott wrote: > Commit 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock") > changed the logic of unset_migratetype_isolate to check the buddy allocator > and explicitly call __free_pages to merge. The page that is being freed in > this path never had prep_new_page called so set_page_refcounted is called > explicitly but there is no call to kernel_map_pages. With the default > kernel_map_pages this is mostly harmless but if kernel_map_pages does any > manipulation of the page tables (unmapping or setting pages to read only) this > may trigger a fault: > > alloc_contig_range test_pages_isolated(ceb00, ced00) failed > Unable to handle kernel paging request at virtual address ffffffc0cec00000 > pgd = ffffffc045fc4000 > [ffffffc0cec00000] *pgd=0000000000000000 > Internal error: Oops: 9600004f [#1] PREEMPT SMP > Modules linked in: exfatfs > CPU: 1 PID: 23237 Comm: TimedEventQueue Not tainted 3.10.49-gc72ad36-dirty #1 > task: ffffffc03de52100 ti: ffffffc015388000 task.ti: ffffffc015388000 > PC is at memset+0xc8/0x1c0 > LR is at kernel_map_pages+0x1ec/0x244 > > Fix this by calling kernel_map_pages to ensure the page is set in the > page table properly Acked-by: Rik van Riel -- All rights reversed