Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1315580lqb; Thu, 30 May 2024 07:01:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIVSawq05SNEamN8YOaPfzArZ94fTBec1TTyKA4YvB9nUjw0aaa7Cu61R1YwP9Nr4S68f0Vr4l9RpjU/Xiu/4mGEKHybkEHH137VMyjQ== X-Google-Smtp-Source: AGHT+IEKexU3D3elNiotSdu9hZCri8PDsIW5T5ahwcsidv1LgfugTpJE+b0nWbpnXbdEprka83l9 X-Received: by 2002:a05:6a21:328d:b0:1af:fe9e:5e43 with SMTP id adf61e73a8af0-1b26452d7camr2400278637.11.1717077677203; Thu, 30 May 2024 07:01:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717077677; cv=pass; d=google.com; s=arc-20160816; b=EysY4U+HyQ7Gk/eoReJt+4CN1azsLi+lRx818Op55o5dYf652hvkKMU5VHdpQh5exu WnT/0ENXxydaKT9SVd1tB4t7euNLIbomq4JVaWz3BzSqLPYzi9ChDNqhmhYi3kKeRwIB wqHrhlBEvNstnug4NKOqP3lcHxbCr8ANoUQJ3GK79dpp3ACuXc7qpB5i9JSsPeFBJHvQ fQu3rl6A5O2/QD45zz/K/6b2D8rM9IvIwtLqpuTBu3OB0OkiJQBlj6BYSMBoTIebfy02 KbDlXF0bgl7Dm+KPqaB9fSli+HmTNQlCVwRNQUpt87lyMTkWwF7xAQdr5B8i8CIQQp2l 1vrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=HkZpCy9QttD+9l7CYdCU/NiUTyWPLxUPH568IGQdkjc=; fh=eoHkjZBPSdVVJru8Z4AyehB1S5Dv4REm1CAs19l3JNE=; b=SJCZ2cGqnY4LbLaodurpECKkn63pDgsJ6X4+GlBqy6ZAN1ks9ulf/KLti73tdrIBbh 6jwkgDE1VfsG6IUoKVEWVaTUALdpc//Q/pZ00ty7x3qvmC/6J5kJ2iwNOg8ZT70eW73x 2jzwU/1sSncquop8TMQxpv/JcOaXuSRXpFqUjbMNtK6Xzh0hWwVglSVzu558CpmSLrs+ CSIEEkEzYoCs06FWSlRtnZQWl+6LPTowHACLH6hHcwtz5ssNiOpWBPsCwE05N3DttQcj hcNjsVP31POqyd0AhxQHy0Wz1glfnYD5EEayzO61Vpm2u6nanOcG1hi6G0y2T3BFiuF0 tqwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-195479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195479-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229a3042asi1039645a12.660.2024.05.30.07.01.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 07:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-195479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195479-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 89D33282FB6 for ; Thu, 30 May 2024 14:00:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0777186E52; Thu, 30 May 2024 14:00:28 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13FED186E32; Thu, 30 May 2024 14:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077628; cv=none; b=Y4arpDiQU0cVrmzoetzNkiD6tIG/W6jgWDbR1xKm6Ww5qtR8YNW1yfgLM4DFYfzNwzrZlO+qI/A6RcaS+BqteMldky8J5rSfrJHUInC9s/+e3UAf/Inw3t8/mhSnD+BbI+MledYIYCbVr/dMmZfmMf4PJc5ZX7KTylp3qtQL9FA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077628; c=relaxed/simple; bh=wCx8iiEp261jvrvjM1hzx6frOs/knK+xtBsnK/gZCnM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LJ/8hzh4ZpQ+8TMDwx3V5jeqP6wa0vdSfPu/h3gS6oadKhTBctABQbHIzhy0uuFDfIfzkgcqmXg0eBQ0y5k0SFB1XWQpiBnjE43GRVx/k/SjvDXnz9Tf/eyw1hX9gFmnyq38tYHe8ibE099jJAGjYIJuYZc7ClYHj0Blxp3mUJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1F32C3277B; Thu, 30 May 2024 14:00:25 +0000 (UTC) Date: Thu, 30 May 2024 09:59:53 -0400 From: Steven Rostedt To: Ilkka =?UTF-8?B?TmF1bGFww6TDpA==?= Cc: "Linux regression tracking (Thorsten Leemhuis)" , Linux regressions mailing list , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: Bug in Kernel 6.8.x, 6.9.x Causing Trace/Panic During Shutdown/Reboot Message-ID: <20240530095953.0020dff9@rorschach.local.home> In-Reply-To: References: <5b79732b-087c-411f-a477-9b837566673e@leemhuis.info> <20240527183139.42b6123c@rorschach.local.home> <20240528144743.149e351b@rorschach.local.home> <20240529144757.79d09eeb@rorschach.local.home> <20240529154824.2db8133a@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 30 May 2024 16:02:37 +0300 Ilkka Naulap=C3=A4=C3=A4 wrote: > applied your patch and here's the output. >=20 Unfortunately, it doesn't give me any new information. I added one more BUG on, want to try this? Otherwise, I'm pretty much at a lost. :-/ -- Steve diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index de5b72216b1a..a090495e78c9 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -39,13 +39,17 @@ static struct inode *tracefs_alloc_inode(struct super_b= lock *sb) return NULL; =20 ti->flags =3D 0; + ti->magic =3D 20240823; =20 return &ti->vfs_inode; } =20 static void tracefs_free_inode(struct inode *inode) { - kmem_cache_free(tracefs_inode_cachep, get_tracefs(inode)); + struct tracefs_inode *ti =3D get_tracefs(inode); + + BUG_ON(ti->magic !=3D 20240823); + kmem_cache_free(tracefs_inode_cachep, ti); } =20 static ssize_t default_read_file(struct file *file, char __user *buf, @@ -147,16 +151,6 @@ static const struct inode_operations tracefs_dir_inode= _operations =3D { .rmdir =3D tracefs_syscall_rmdir, }; =20 -struct inode *tracefs_get_inode(struct super_block *sb) -{ - struct inode *inode =3D new_inode(sb); - if (inode) { - inode->i_ino =3D get_next_ino(); - inode->i_atime =3D inode->i_mtime =3D inode_set_ctime_current(inode); - } - return inode; -} - struct tracefs_mount_opts { kuid_t uid; kgid_t gid; @@ -384,6 +378,7 @@ static void tracefs_dentry_iput(struct dentry *dentry, = struct inode *inode) return; =20 ti =3D get_tracefs(inode); + BUG_ON(ti->magic !=3D 20240823); if (ti && ti->flags & TRACEFS_EVENT_INODE) eventfs_set_ef_status_free(dentry); iput(inode); @@ -568,6 +563,18 @@ struct dentry *eventfs_end_creating(struct dentry *den= try) return dentry; } =20 +struct inode *tracefs_get_inode(struct super_block *sb) +{ + struct inode *inode =3D new_inode(sb); + + BUG_ON(sb->s_op !=3D &tracefs_super_operations); + if (inode) { + inode->i_ino =3D get_next_ino(); + inode->i_atime =3D inode->i_mtime =3D inode_set_ctime_current(inode); + } + return inode; +} + /** * tracefs_create_file - create a file in the tracefs filesystem * @name: a pointer to a string containing the name of the file to create. diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h index 69c2b1d87c46..9059b8b11bb6 100644 --- a/fs/tracefs/internal.h +++ b/fs/tracefs/internal.h @@ -9,12 +9,15 @@ enum { struct tracefs_inode { unsigned long flags; void *private; + unsigned long magic; struct inode vfs_inode; }; =20 static inline struct tracefs_inode *get_tracefs(const struct inode *inode) { - return container_of(inode, struct tracefs_inode, vfs_inode); + struct tracefs_inode *ti =3D container_of(inode, struct tracefs_inode, vf= s_inode); + BUG_ON(ti->magic !=3D 20240823); + return ti; } =20 struct dentry *tracefs_start_creating(const char *name, struct dentry *par= ent);