Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp359761ybh; Mon, 20 Jul 2020 19:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQwBBoV6nWmN5sIiyEyJmLdSkDKh9dmhpSwrNyhrpltupZFXAOB21LWStL3BJPGwbIHwI3 X-Received: by 2002:a17:906:fcab:: with SMTP id qw11mr23129823ejb.456.1595297744054; Mon, 20 Jul 2020 19:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595297744; cv=none; d=google.com; s=arc-20160816; b=BLDStTAqu1L5dKlij4rY5QUjvdBxMRnBm13NpxbqKl6JIj5yvMl88AnlPnemqPpCbB 86P4jIHzMZtKjxLcwpCMw8z9wq+Bg5Z+QZoG+PKAi/3Whenv0ZNAkRwnoCYJHRWPwvvb Pi0ysgL53jL9CPM5SbC1pPICN3c34NDNezNFXwn8WF4GDa3jiTV96qJfUujBi+SdvNMQ Lu0uIhJeGLNHy2mAYEytSdi0kDcbOWgLq9ciuicdBEpG566cPlLqLNCaPir858Mb1xh1 2yxVN3WZS2QmWP7yTyZFRFIrEGIHk1RfnpXEmjpNC7Og5fjLG+OANn+/zgb6ndO6G45M osBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=W3Whq0VMGEfbWzT64X+GmmnV7xR1Aj5wCM1jsNMxHBM=; b=wxb3j5BEV5d3BBE4Tc2rSw11bOm+461LBnh56mYzyJpZDyrl60yl4L55f3HELDn4oj ndPB61aJn0B8Qn6BnQkusd6MlMcDHmfvQdZy1OXZKjYl9xGYnfp42brIbImaVs09xjJD rGz+t2psTHw9ehrhWsVT3QfAIQz1/EkNlLuB+q28CDh+4VLasHGTyEHyLtlFCNmfEtsf PSe1p3Yh7rdXuZrZnP/m7h0KXCxVx+JRMFDihjIP4mMnl4LtVkl/CJkktVUlje+pJpB2 h0AG3IQbJf5Jy70+OyorVfVRA2rDrrCpFpTpirzwq/clo6ulKL83PsjyUaPp1xdmlQ1i IRzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="PH/J2Afm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz19si12779821ejb.202.2020.07.20.19.15.21; Mon, 20 Jul 2020 19:15:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="PH/J2Afm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726161AbgGUCOy (ORCPT + 99 others); Mon, 20 Jul 2020 22:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgGUCOx (ORCPT ); Mon, 20 Jul 2020 22:14:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B8DC061794 for ; Mon, 20 Jul 2020 19:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=W3Whq0VMGEfbWzT64X+GmmnV7xR1Aj5wCM1jsNMxHBM=; b=PH/J2AfmYn5tmaL14rs1lgEflz dPea72AhZomOFw+IqosbYe/rca8ShnXoeJwy45RX+14txjAZXaCKtfmskakMSfsTqY4MoO91hLk5C cfFM32PYUty6SWyxhRxeT2F4/EqKNwZDuKCaoWt8Pt+tOWMtVdGumDvJq+nSDUg74R79qnSCX1jlB 0HPLpbNUz7RWOy+E5UKEhcMBcDGQEOFcV3o24edtBA5G3U2iolvftpEHcWRcst9zy1WNiGsfFwRnl QOdIhCiarzGxO8aBNTxH7lhgRfZCjkP5zYtSdFCJ+zuV3s4UOeqG8KpR63uQsDwIJ/qpTgD7bgTKZ kR6z94OA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxhnu-0002CG-09; Tue, 21 Jul 2020 02:14:50 +0000 Date: Tue, 21 Jul 2020 03:14:49 +0100 From: Matthew Wilcox To: Andrew Morton Cc: syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, "Kirill A. Shutemov" , Ralph Campbell , David Hildenbrand , Mike Kravetz Subject: Re: kernel BUG at include/linux/swapops.h:LINE! Message-ID: <20200721021449.GC15516@casper.infradead.org> References: <000000000000bc4fd705a6e090e2@google.com> <0000000000004c38cd05aad1d13f@google.com> <20200720165144.93189f7825bd28e234a42cb8@linux-foundation.org> <20200721002147.GA15516@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721002147.GA15516@casper.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 21, 2020 at 01:21:47AM +0100, Matthew Wilcox wrote: > On Mon, Jul 20, 2020 at 04:51:44PM -0700, Andrew Morton wrote: > > On Sun, 19 Jul 2020 14:10:19 -0700 syzbot wrote: > > > > > syzbot has found a reproducer for the following issue on: > > > > > > HEAD commit: 4c43049f Add linux-next specific files for 20200716 > > > git tree: linux-next > > > console output: https://syzkaller.appspot.com/x/log.txt?x=12c56087100000 > > > kernel config: https://syzkaller.appspot.com/x/.config?x=2c76d72659687242 > > > dashboard link: https://syzkaller.appspot.com/bug?extid=c48f34012b06c4ac67dd > > > compiler: gcc (GCC) 10.1.0-syz 20200507 > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1344abeb100000 > > > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > > Reported-by: syzbot+c48f34012b06c4ac67dd@syzkaller.appspotmail.com > > > > Thanks. > > > > __handle_mm_fault > > ->pmd_migration_entry_wait > > ->migration_entry_to_page > > > > stumbled onto an unlocked page. > > > > I don't immediately see a cause. Perhaps Matthew's "THP prep patches", > > perhaps something else. > > That's interesting. I'm currently chasing that signature too. Of course, > almost anything can cause this. > > What I do have in my tree is a patch to turn that WARN_ON into a > VM_BUG_ON_PAGE and what I see is not just an unlocked page, but one > that's been freed. Here's an example crash: 1404 086 (25392): drop_caches: 3 1404 page:00000000c8b7c292 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0xac20 1404 flags: 0x4000000000000000() 1404 raw: 4000000000000000 fffff7b501775808 fffff7b501ab7008 0000000000000000 1404 raw: 0000000000000001 0000000000000005 00000000ffffff7f 0000000000000000 1404 page dumped because: VM_BUG_ON_PAGE(!PageLocked(p)) (that's generic/086 for what it's worth, but you have to run through a number of other tests in order to hit it; even starting at generic/08[0123456] isn't enough to hit it, and it doesn't always hit) A mapcount of -128 indicates PageBuddy, but I've also seen a mapcount of 0 indicating it's still on the per-cpu freelist.