Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2156863imw; Sun, 17 Jul 2022 02:44:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vS2vV28EZxQvajLtbUiQlRehY9upjyWVP5bMzFAILOrkfYbDb68YE7AwwIvqJ/f2N201/K X-Received: by 2002:a17:902:bb91:b0:16c:3f7f:6df0 with SMTP id m17-20020a170902bb9100b0016c3f7f6df0mr23268277pls.99.1658051045124; Sun, 17 Jul 2022 02:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658051045; cv=none; d=google.com; s=arc-20160816; b=XCtXg7Kco+/tJLKMIyBpCPGFbZVOBeza4lkN1PJc2eefeIX4FbuDyDfV90Tob5XbLT HjF3gf1jpWYS+GdZ54B46HlJZ7uGFHVzO8977IsfUwPyq22qga+xJWcM5AEz/Y8lSD1P 9O2Nl80uklRh1g/dMpmxjf0XJzUYY1KMPQk7Pg+bzf7zwvbi9T3C0FQJTgNw6SLT34mu c13NOofbOOp7GHE4zhr+qAlF2vy80ByfmkqkEimkLa3BOcCyjDj2Ww7zqWfnM+4Nhutl b32+2zdjopkZSTzwTBRDe9asFqfXvSBqg6tFMRe3ZYuVj26Jrs6s0Ui4y3XGgDATWv6T mA2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=6EsY1Il6zMvAlPY/k7NKjL4ZCQMcNQBfULNgS/j2YX0=; b=06uI/m7clebh5KgiNJXrt/pKi7mkmV5hSE1DJbrDULNutwfVny8HAWkuPcZUHIGEDS uaJrHKmIcUwlOmhoh0Y7EnGLPHwmMwwnfAILVonJcRT5Z1OqYZkMz3TkEb5XJ/SMVsnD 7WTzv3fXhwCUP8mtjo0e0ecmI4Aojsb3ZVpo06/GfO97ZRWgPdeXB/0ZNpiRXHMHlG/o DJv/bT684GjCtHuBVeMOZGh8QWS99lY4x99czYWTGF8S1Lkm9XE92H4/VOTtwpEQOHRI Qvqr5j5Zp+FBr774AjQweJm+NafBzRkkp65kZbdQbAsLkxXZaPm47IX4V6DIdOjfS2ZU QcvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=ldFgD2ea; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a170902ab8500b0016be51bb9bfsi10630140plr.325.2022.07.17.02.43.51; Sun, 17 Jul 2022 02:44:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=ldFgD2ea; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbiGQJnB (ORCPT + 99 others); Sun, 17 Jul 2022 05:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiGQJnA (ORCPT ); Sun, 17 Jul 2022 05:43:00 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6997215FC4; Sun, 17 Jul 2022 02:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658050972; bh=vhwv/cE+/iUvXmdeeOxc1S09IIZs//noF3qbXj0s4ug=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=ldFgD2eaZD1pVw5asOs0QWKCUYx+HxS5sOeDtjxI9Z83CYvqkjU+pxDljX6RY5cbE N+w4iuHbcEPCJldOAGZUFnHu7674HOYkkjLQdxtg17oJeSfHHIvqx72u8DYSD334R/ S9hAljR+zLCnayaeS4qTxyzYIsF9oyeXtSFDmj8c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.157.253]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MCbIx-1oL1QN1Nml-009f7X; Sun, 17 Jul 2022 11:42:52 +0200 Message-ID: <7bc6b466-9b9a-b857-8f72-2dce99b18939@gmx.de> Date: Sun, 17 Jul 2022 11:42:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: WARNING: CPU: 1 PID: 14735 at fs/dcache.c:365 dentry_free+0x100/0x128 Content-Language: en-US From: Helge Deller To: Hillf Danton Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org References: <20220709090756.2384-1-hdanton@sina.com> <20220715133300.1297-1-hdanton@sina.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qQ+ywuZzB3aULnrtb/vHM3ak6A5Ja+/LBhNDG6rPrOsDe9ifuT2 c3NsARU749IitoGoiNBXKM3kGQ3hEH/MaVw9Eb+uCyt8O6TvbzclhzmYyZBGtDqT/j+vojE sxqNvAhOAkl+iK57yPFsinxOXoi7QbRS/mL8f4lJ3/nUuv0S06xnjQuHSIH6HY/zDNGJzdF +PI2JC7kfoxm4XhRYUbLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:NpoQklh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FoE2hbjLYlhdSuQ23EdDzxAEgAG/5vpoZDdiNcRQbFP7yE4pbl 7L3wH7y1sPD6syYEDFwy/E6jfdE4fHSZvzqavvtIEhWCfqv/8++5J1neg== X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hillf, On 7/16/22 07:27, Helge Deller wrote: > On 7/15/22 15:33, Hillf Danton wrote: >> On Fri, 15 Jul 2022 10:18:23 +0200 Helge Deller wrote: > and this was the output: > > [108563.953441] IAOQ[1]: dentry_free+0xc4/0x338 > [108564.005441] RP(r2): __dentry_kill+0x284/0x2e8 > [108564.057443] Backtrace: > [108564.089454] [<000000004073bab0>] __dentry_kill+0x284/0x2e8 > [108564.157445] [<000000004073d2f8>] dput+0x334/0x5a8 > [108564.213444] [<00000000407267a4>] step_into+0x790/0xa88 > [108564.277444] [<0000000040727084>] walk_component+0xa8/0x330 > [108564.345443] [<00000000407275f8>] link_path_walk.part.0.constprop.0+= 0x2ec/0x4d0 > [108564.437443] [<0000000040728254>] path_openat+0x150/0x1ba8 > [108564.501441] [<000000004072ba28>] do_filp_open+0x9c/0x198 > [108564.569441] [<0000000040701d20>] do_sys_openat2+0x14c/0x2a8 > [108564.637441] [<0000000040702654>] compat_sys_openat+0x58/0xb8 > [108564.705440] [<0000000040303e30>] syscall_exit+0x0/0x10 > [108564.769444] > [108564.789435] ---[ end trace 0000000000000000 ]--- > [108564.845444] dentry =3D 000000031624e6c0 > [108564.889437] spin_is_locked(&dentry->d_lock) =3D 0 > [108564.945436] dname_external(dentry) =3D 0 > [108564.993436] dentry->d_flags & DCACHE_NORCU =3D 0 > [108565.045446] dentry->d_name.len =3D 3 > [108565.089435] dentry->d_name.hash =3D 89116695 > [108565.137435] dentry->d_lockref.count =3D -128 > [108565.189434] dentry->d_flags =3D 32776 > [108565.233435] dentry->d_inode =3D 0000000000000000 > [108565.285429] dentry->d_parent =3D 000000022ef756c0 > [108565.341434] dentry->d_u.d_rcu =3D 0x416be770 > >> Add debug info to the diff below. Cut the first BUG_ON off if it>> trig= gers and see if the second one can be hit. I used WARN_ON() instead of BUG_ON(). With that, both triggered, first the first one, then the second one. Full log is here: http://dellerweb.de/testcases/minicom.dcache.crash.6-warn Helge >> +++ y/fs/dcache.>> @@ -605,8 +605,10 @@ static void __dentry_kill(struc= t dentry >> spin_unlock(&parent->d_lock); >> if (dentry->d_inode) >> dentry_unlink_inode(dentry); >> - else >> + else { >> + BUG_ON(!hlist_unhashed(&dentry->d_u.d_alias)); >> spin_unlock(&dentry->d_lock); >> + } >> this_cpu_dec(nr_dentry); >> if (dentry->d_op && dentry->d_op->d_release) >> dentry->d_op->d_release(dentry); >> @@ -616,6 +618,7 @@ static void __dentry_kill(struct dentry >> dentry->d_flags |=3D DCACHE_MAY_FREE; >> can_free =3D false; >> } >> + BUG_ON(!hlist_unhashed(&dentry->d_u.d_alias)); >> spin_unlock(&dentry->d_lock); >> if (likely(can_free)) >> dentry_free(dentry);