Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbdF1LcW (ORCPT ); Wed, 28 Jun 2017 07:32:22 -0400 Received: from foss.arm.com ([217.140.101.70]:40586 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbdF1LcO (ORCPT ); Wed, 28 Jun 2017 07:32:14 -0400 From: Punit Agrawal To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Vlastimil Babka , Steve Capper , Andrew Morton , Andrei Vagin , linux-mm@kvack.org, LKML , Stephen Rothwell , Cyrill Gorcunov Subject: Re: linux-next: BUG: Bad page state in process ip6tables-save pfn:1499f4 References: <20170624001738.GB7946@gmail.com> <20170624150824.GA19708@gmail.com> <20170627163734.6js4jkwkwlz6xwir@black.fi.intel.com> <87lgodl6c8.fsf@e105922-lin.cambridge.arm.com> <20170627170408.4eowigh3pho2ph36@node.shutemov.name> Date: Wed, 28 Jun 2017 12:32:12 +0100 In-Reply-To: <20170627170408.4eowigh3pho2ph36@node.shutemov.name> (Kirill A. Shutemov's message of "Tue, 27 Jun 2017 20:04:08 +0300") Message-ID: <87fuekl54z.fsf@e105922-lin.cambridge.arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2640 Lines: 62 "Kirill A. Shutemov" writes: > On Tue, Jun 27, 2017 at 05:53:59PM +0100, Punit Agrawal wrote: >> "Kirill A. Shutemov" writes: >> >> > On Tue, Jun 27, 2017 at 09:18:15AM +0200, Vlastimil Babka wrote: >> >> On 06/24/2017 05:08 PM, Andrei Vagin wrote: >> >> > On Fri, Jun 23, 2017 at 05:17:44PM -0700, Andrei Vagin wrote: >> >> >> On Thu, Jun 22, 2017 at 11:21:03PM -0700, Andrei Vagin wrote: >> >> >>> Hello, >> >> >>> >> >> >>> We run CRIU tests for linux-next and today they triggered a kernel >> >> >>> bug. I want to mention that this kernel is built with kasan. This bug >> >> >>> was triggered in travis-ci. I can't reproduce it on my host. Without >> >> >>> kasan, kernel crashed but it is impossible to get a kernel log for >> >> >>> this case. >> >> >> >> >> >> We use this tree >> >> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/ >> >> >> >> >> >> This issue isn't reproduced on the akpm-base branch and >> >> >> it is reproduced each time on the akpm branch. I didn't >> >> >> have time today to bisect it, will do on Monday. >> >> > >> >> > c3aab7b2d4e8434d53bc81770442c14ccf0794a8 is the first bad commit >> >> > >> >> > commit c3aab7b2d4e8434d53bc81770442c14ccf0794a8 >> >> > Merge: 849c34f 93a7379 >> >> > Author: Stephen Rothwell >> >> > Date: Fri Jun 23 16:40:07 2017 +1000 >> >> > >> >> > Merge branch 'akpm-current/current' >> >> >> >> Hm is it really the merge of mmotm itself and not one of the patches in >> >> mmotm? >> >> Anyway smells like THP, adding Kirill. >> > >> > Okay, it took a while to figure it out. >> >> I'm sorry you had to go chasing for this one again. >> >> I'd found the same issue while investigating an ltp failure on arm64[0] and >> sent a fix[1]. The fix is effectively the same as your patch below. >> >> Andrew picked up the patch from v5 posting and I can see it in today's >> next[2]. >> >> >> [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-June/510318.html >> [1] https://patchwork.kernel.org/patch/9766193/ >> [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/mm/gup.c?h=next-20170627&id=d31945b5d4ab4490fb5f961dd5b066cc9f560eb3 > > Ah. Okay, no problem then. > > But I think my fix is neater :) Hehe.. I'm fine with either as they both fix the problem. :) The reason I kept head and page initialisations separate is to ensure in the future somebody doesn't conclude the page and head are the same - which is true in most instances unless you've got contiguous hugepages where that assumption breaks. But this isn't really full proof anyways.