Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp670417rdb; Mon, 29 Jan 2024 14:37:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNROlvdl5F3lcI5SeXmR8hbkp39vOL8VFsm7QsXqnsVmd21g5KWOBlM07Y6AcgHNFTmSFW X-Received: by 2002:a05:6902:206:b0:dc2:48af:bf09 with SMTP id j6-20020a056902020600b00dc248afbf09mr4012015ybs.62.1706567843839; Mon, 29 Jan 2024 14:37:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706567843; cv=pass; d=google.com; s=arc-20160816; b=IyXQzQKR1XJrkvvvWSXiSRHV1JhyvMJuSRq3ekMeQNc9CEZgcsUrrhz2Dm6vFmVGnw vMxPuhfVecTDiatZUdil2/6q0On58SXWjsCoadGXvBt46VvI26nRITn3kD725cguZYwK WaIyX5avsKWXKPG6tg5cPGZB/AE/Xacb6mQomiVb3xiXxschcP6BnGv+qzVXXvgL9HOC k+3rp5RfQWlvPs3pbyxSqsW9Qfd8CSK4nx7UwQoc7PtfGIfF5LR24wZcQU102JH/5ctg Q+Dn4KwMwy6Vz/M+lYRtvFfZ5oLuxar54nEX/MGv+popdPc7IAWZ7T1mFSSFrSdr7+Js fPoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=1hj+C8eVFms56HSNUtGD4vDso2zbX9G6i0iFWoHn8+w=; fh=Md50wLehZoDD5Sx7nueCG/UN4tfSAivmPz4nrPW3cUY=; b=VyzudM08JkBdG215JW5j7QBLOdZrIhcH0w/wJiNmpm0TlxcYr1up0d5MIRA9YBxgA0 u3qyxr+aAGQppKiykwkPI/vd4mtLLelmL2EJc2ODYsEegzxtXKP7uLkEWvnDaBMxVQnk atdaJ71ZeLtccET407yyL/iAkTvyCMWc8Fayso3nWrii85KTZqOr+kz8MEY5VgXZhgiL 4payga2u+5hhQDduWfeJRkV/IczcC4hdcfvpX2EjhhtTNEUa3/pETRrhSMCS7WejpNPQ 35nQnA7h7oWFbZsLhG8ecBhJAEFhR7pBP3R005V03fRYjWu/l/Y4EBI6klBRR50+XGEw vlXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=C7XpMCIP; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-43575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43575-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r16-20020a056214125000b0067f60f66a13si8690258qvv.581.2024.01.29.14.37.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 14:37:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=C7XpMCIP; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-43575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43575-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 829541C22B5D for ; Mon, 29 Jan 2024 22:37:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 994E715A4B2; Mon, 29 Jan 2024 22:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="C7XpMCIP" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 042D853E07 for ; Mon, 29 Jan 2024 22:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706567758; cv=none; b=GJM2KSkc6K87OkTSmTX97ybNFijjsvhcoybgpr1P2607Umz95Wwfur/6WrTIiJi+tL+HSboY7Lql5fotYK6a2xllOwIW5qJxcGU60qLfmWl4eiLGeGGEGgVYxf1IJc4Ap5MPLMRraA/GAn9mMHqux7xj3rP/rsCRqoaHo1m4x2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706567758; c=relaxed/simple; bh=VnTiScXQo7bZZSg4GpsGPNgsG9aIQqnuAmV4bkEVHE4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=R/L2k957VUELg3xGk9+Nq3or/B1EILIxxR6AQojyh8tLBVVO0weKHqc9n1R7IXzhyC23F3+44hq2Ro+IL5fb2XR4BblQyJsGDxkgoY/FBOybKsqIpG+Pt1qBihN+EpP7Jn7HIavs/Q4q8sIps3E+ZcIskA3+w1mu+Z+s0UZwjwc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=C7XpMCIP; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d04c0b1cacso17398591fa.0 for ; Mon, 29 Jan 2024 14:35:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1706567755; x=1707172555; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1hj+C8eVFms56HSNUtGD4vDso2zbX9G6i0iFWoHn8+w=; b=C7XpMCIPLV3aBXlRpK/jSod7hMEzchvQUqK7g+DKNPBMmaUd4+MoIt+5JzQOHyQSjU jbkV7n8KpR2P+w/i28qeZt3cmjiVSEtvRu1iEniWF0ha6ZXZM0lkxWwoxzadf8LLomj6 RNiltSzVL7i51n4z6OF/XH8UPTbF2IcCrUMmY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706567755; x=1707172555; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1hj+C8eVFms56HSNUtGD4vDso2zbX9G6i0iFWoHn8+w=; b=O45xC/2xp/nzDxqm72/B+z4Yqnjw1UETFkIy/uMfAPPOVk4oi1ZPxo1BB/SPufZWS8 nO/TXxZr2wUZwpx6m8vAE146tXj+37cCTBjjwjM2zjA/PlvJ6A+cOPcXAOQSD2kxQrSz 5RQXtc9iMleRZCRipZk9wvM5+wUetO8ctlyH/qRl9jiZZZA1KlM4UL/8Czcz8DC/JfZf bc+1KYbaBCaPfRp1krWVvSbrr8a9MXPB4WZJsEJDGrgOqbwsbfIx94wPpXosrgZZ2j5Q I9GrMJ8VYoXZ7oH8US9dQ9uZXAeffLBppHZkaDxUnkbTDB+w0aM/ibGmAqr3qscBXJ+m 4YZQ== X-Gm-Message-State: AOJu0YxtfrC+NR08dnhMTdRcQEPuyFTiICQveqTWiZYQ6htGWtAzk86M hmKPQl38JBjTfwDFBvMQlZYSqaF30v2egf2ixRXSaXEo/rgX0TaI2860zxMmHM9D3Nww/jg9AUi 36Hp/tw== X-Received: by 2002:a2e:95cb:0:b0:2cf:32cd:80c with SMTP id y11-20020a2e95cb000000b002cf32cd080cmr4975717ljh.32.1706567754736; Mon, 29 Jan 2024 14:35:54 -0800 (PST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id q5-20020a2e9685000000b002d050c4da1dsm336124lji.121.2024.01.29.14.35.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jan 2024 14:35:54 -0800 (PST) Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d057b6ddfdso2946901fa.2 for ; Mon, 29 Jan 2024 14:35:53 -0800 (PST) X-Received: by 2002:a2e:9a93:0:b0:2cf:22f1:bd5e with SMTP id p19-20020a2e9a93000000b002cf22f1bd5emr4180113lji.44.1706567753589; Mon, 29 Jan 2024 14:35:53 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202401291043.e62e89dc-oliver.sang@intel.com> <20240129120125.605e97af@gandalf.local.home> <20240129152600.7587d1aa@gandalf.local.home> <20240129172200.1725f01b@gandalf.local.home> In-Reply-To: <20240129172200.1725f01b@gandalf.local.home> From: Linus Torvalds Date: Mon, 29 Jan 2024 14:35:37 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address To: Steven Rostedt Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Christian Brauner , Al Viro , Ajay Kaher , linux-trace-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 29 Jan 2024 at 14:21, Steven Rostedt wrote: > > But crashes with just a: > > # ls /sys/kernel/tracing/events > > [ 66.423983] ------------[ cut here ]------------ > [ 66.426447] kernel BUG at fs/dcache.c:1876! Duh. That's a bit too much copy-and-paste by me. So what is going on is that a ->lookup() function should *not* call d_instantiate() at all, and the only reason it actually used to work here was due to the incorrect "simple_lookup()", which basically did all the preliminaries. A ->lookup() should do 'd_add()' on the dentry. So just replace all the d_instantiate() calls there with "d_add()" instead. I think that will fix it. Basically the "simple_lookup()" had done the "d_add(dentry, NULL)", and at that point the "d_instantiate()" just exposed the inode and turned the negative dentry into a positive one. So "d_add()" is "I'm adding the inode to a new dentry under lookup". And "d_instantiate()" is "I'm adding this inode to an existing dentry that used to be negative" And so the old "d_add(NULL)+d_instantiate(inode)" _kind_ of worked, except it made that negative dentry visible for a short while. And when I did the cleanup, I didn't think of this thing, so I left the d_instantiate() calls as such, even though they now really need to be d_add(). Hope that explains it. And I hope there aren't any other stupid things I missed like that. Linus