Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp662963yba; Sun, 31 Mar 2019 09:20:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSh11RVv8ZJON6sqiFpN/8RsfsBAQ1vuKbjy7vGlQJSDVCKcIfoS/2Ux5/7oQvWt/S/JNA X-Received: by 2002:a62:e418:: with SMTP id r24mr58899763pfh.52.1554049229683; Sun, 31 Mar 2019 09:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554049229; cv=none; d=google.com; s=arc-20160816; b=a2Kz3vKH4gn85R061Eec96WR652gsmSV9s+y4VoZRw+/kc4tcnyuOZDvEADhd65hfw KS0FDWMtroYOc/Rnp0BWBqkYhF23rNmfwp+px+V0h4wVjBOD7PpwUUbfATquXsU3ooZN 226arR7Wo/taAmeh0PFjqQPP6RIey800qgoUO/H8duhx9DUTaCXFnjnEmDj2GgnUXs0X fIYIU+xbkzFV+qA5S5mj4vhRySxAFmuJFbUoxeHj+FySysdCL+akOZ61mKuKqrCZ84tD wQC0LGdUwtlgDlmvnhZxzbIn4/jxbPB/KvAjz6S1uNCvzdoQUnbu97fKa+N0OCRJJ7Y2 0M1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=yFLne+esl7CxqPkB1BSyS31PV8qDXzGe9+FkeRn80+U=; b=c64a0/deLFEcxHL7x0rPOEXC6eZWEbh8zRK9okozpQYAaR5TN7C3BG6s5cyx1HL8IC qbe5uddZFoOOdO4yG7S3isRwH2Egh/ZUBTYvqtJItOQOcFPgoBR8/VTACjPe0W9MYrtE DfVpQrx72uKZqkWQ4YHm7YUwV3jzm0PSthpM/1gVuFjTHxD+HZLVAUzaNLXdSRukhsTP DlfpVcekEjj/F191PHSrC5KAuJA1KEJJCA2FWpexsrlmlep110n30TfUCFujxBvmRF1y qQZO0qbo+Q/DWEa/wFc+O4f8LeYDq6cQybZTUU1INxFdXg2PvBP6bUjNZlrHxbrbfPRl f34A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=nrlAcoot; 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=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u185si6848284pgd.489.2019.03.31.09.20.05; Sun, 31 Mar 2019 09:20:29 -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=@yahoo.ca header.s=s2048 header.b=nrlAcoot; 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=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731255AbfCaQPw (ORCPT + 99 others); Sun, 31 Mar 2019 12:15:52 -0400 Received: from sonic310-11.consmr.mail.ir2.yahoo.com ([77.238.177.32]:41851 "EHLO sonic310-11.consmr.mail.ir2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731222AbfCaQPw (ORCPT ); Sun, 31 Mar 2019 12:15:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1554048946; bh=yFLne+esl7CxqPkB1BSyS31PV8qDXzGe9+FkeRn80+U=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From:Subject; b=nrlAcoot1uXd2QzH9anR3TKwP9RVm/85iGBvC8d2khbRpCbE2UjyMnbOwTB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KL3Os4WcwtLR_boVad3S5FbEJ1mf_fatdpk.GGgIWBNw9xlsjf aAmInuD81b.hyHuG5k8dCjqrRIocal_sVyNyE2Fkg27uLKxCcI3CZrAGWQdWz5jSP3IfmIHFZmh9 w3WcohBiloGq45bBVtb_zlK8eVPRzrVuANrfjeDmgDPWJtTw3y5qbT7d6iaI92gy8d4qkKi1ode_ rsJb0Elb.6iSXUqC4ZaCvnAvop6S3W_WiHJR0hk5vrbmzGsF2jcttSXab0gsk0KCULcdS8w4AwYw CnEXMIZwKosYZGhQcarqZ4Fn5gmu1XE7re8w53sA.I4uluaw3xDi8E36n8C73IBzg8lA- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Sun, 31 Mar 2019 16:15:46 +0000 Received: from pink.alxu.ca (EHLO localhost) ([198.98.62.56]) by smtp430.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 33cc58c9291985f5d2394688291da901; Sun, 31 Mar 2019 16:15:41 +0000 (UTC) Date: Sun, 31 Mar 2019 12:15:36 -0400 From: "Alex Xu (Hello71)" Subject: Re: shmem_recalc_inode: unable to handle kernel NULL pointer dereference To: Vineeth Pillai Cc: Andrew Morton , Hugh Dickins , Kelley Nielsen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Rik van Riel , Huang Ying References: <1553440122.7s759munpm.astroid@alex-desktop.none> In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/0.14.0 (https://github.com/astroidmail/astroid) Message-Id: <1554048843.jjmwlalntd.astroid@alex-desktop.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Vineeth Pillai's message of March 25, 2019 6:08 pm: > On Sun, Mar 24, 2019 at 11:30 AM Alex Xu (Hello71) w= rote: >> >> I get this BUG in 5.1-rc1 sometimes when powering off the machine. I >> suspect my setup erroneously executes two swapoff+cryptsetup close >> operations simultaneously, so a race condition is triggered. >> >> I am using a single swap on a plain dm-crypt device on a MBR partition >> on a SATA drive. >> >> I think the problem is probably related to >> b56a2d8af9147a4efe4011b60d93779c0461ca97, so CCing the related people. >> > Could you please provide more information on this - stack trace, dmesg et= c? > Is it easily reproducible? If yes, please detail the steps so that I > can try it inhouse. >=20 > Thanks, > Vineeth >=20 Some info from the BUG entry (I didn't bother to type it all,=20 low-quality image available upon request): BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 #PF error: [normal kernel read fault] PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 0 Comm: swapoff Not tainted 5.1.0-rc1+ #2 RIP: 0010:shmem_recalc_inode+0x41/0x90 Call Trace: ? shmem_undo_range ? rb_erase_cached ? set_next_entity ? __inode_wait_for_writeback ? shmem_truncate_range ? shmem_evict_inode ? evict ? shmem_unuse ? try_to_unuse ? swapcache_free_entries ? _cond_resched ? __se_sys_swapoff ? do_syscall_64 ? entry_SYSCALL_64_after_hwframe As I said, it only occurs occasionally on shutdown. I think it is a safe=20 guess that it can only occur when the swap is not empty, but possibly=20 other conditions are necessary, so I will test further.