Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1802980rdb; Wed, 31 Jan 2024 09:26:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjZtMOAWkgJlkPg0Zg/5jK9t3IbTZ6n37+DxY9ZU047lbeEg6t1cE4QL6wrTg98Tvgjkfx X-Received: by 2002:a62:cdcc:0:b0:6d9:a565:9be6 with SMTP id o195-20020a62cdcc000000b006d9a5659be6mr2288730pfg.9.1706721983180; Wed, 31 Jan 2024 09:26:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706721983; cv=pass; d=google.com; s=arc-20160816; b=Z7IjDBOn7tKAWXTWg8Cwx2wrbmZPUx8IyDd/H5Je+E+fVqykL+nEEUYRo100gdBGqo hqxEcwSUhR4SfXHntYBKFcXsKR8MaSTLfQnz3BsqXyKvMTAOf4Ws/txfsG/uSrdLjI7T ctkMznOhxfx13AfuwF+Cq2ajGn5HMw6hskBYc+NjErt2NDP8xW8VRp39QEAhJaPUFWms cYD51cnydS/j190vxRYHROjEFzSZGIpvxvuvOJdVjLLZxCOPluIua8WaT+8kFv7eaDUY h1QJOwJzCFRMhff3AcvoTy7TLkNgIXn62AN13hJ2WMTcmdlKKuv4ktQL2IWfVqxGwGSa /iNw== 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=ll2FqLTPv9r7b7TY19hs+TCP92Gyl3bEO2kCapfL2cw=; fh=5X5QtrL/HXJF1HfgYRzD/oHB2SapLDVLZjh2bEXRemI=; b=XagPpT4VfXIZ1ngslsEnpxGflBkkinfx/FsN0WuETaYujktMiqgmlppeDYWLzrUEcQ rppjsrU1McthmLI0tzhUlF66Q41VcmUzlXsl0TZHYcDbSzwdcCrTel6IWsJTKhBczJld V3ekJn6Lx+MUzmfJ4Fnak1cm6hWUA1pu0+vOjZMxq7WBBHOi4UV8RiPvs21AuSbWKkyx ZYSvJfjNGUAMevhSTZdGXBVdc8A55Nv3XAPk6CN7jv50fhGHVY4uAbC0q1TPIBhBLjVa C7SHN6W/4S0m59lP5wVDA0U9l3mc1TGIW3J+McnBFY/UJOpPzXxPukNNFgfHlnwuOcMS PBvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-46904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46904-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVwKuoSm+Rq37o8nXpR8jNINVO+KgamJDgxlFFyTnX042E5Q5Rmn0P/1HtWSZt3Cm45abfpQh5fszCtmOyUKcsAXccA6W7znNArvYqnsw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z29-20020a62d11d000000b006ddcc94a37asi9863175pfg.169.2024.01.31.09.26.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 09:26:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-46904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46904-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 CF3082941FF for ; Wed, 31 Jan 2024 17:26:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90F1112DDB4; Wed, 31 Jan 2024 17:26:06 +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 096EA12DD92; Wed, 31 Jan 2024 17:26:05 +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=1706721966; cv=none; b=QzZGYEdJqavkEkYGG0Bq2su81RinyaUr2vDCX+FUZBXmAjre02HlyyVpTX3IJ8s67b+lp1vrQwJI+vQ5/187VWnwB+IGpiU7G+TkHe+gadptBdAt4abh7RxnYjoFrDWBF63b3ChIR9mO7/mbM3X0TsWLl+ME++PsOIAEfQGhoDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706721966; c=relaxed/simple; bh=Tv/OIdhU0ncVmP7nGCQx/bdXuPecUNW1V8ksBVTdZoU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EyyxenD+Sk5MuPmIATCrVeU8zGQdOQZiFyCFRpDhYex0bm1cxWMZL+wZWB22PJ9SIhyhiSRDteXAivesHaTxMU2IKMoDe3Ot+c88SvzxtVSVBhXH0UjfbeuXdiBaIyZqHycl5nXgdirPmdtcbW5mJCdHHAe+EBjpPmktd7eesM4= 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 2B1A4C433F1; Wed, 31 Jan 2024 17:26:04 +0000 (UTC) Date: Wed, 31 Jan 2024 12:26:18 -0500 From: Steven Rostedt To: Linus Torvalds 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 Subject: Re: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address Message-ID: <20240131122618.7c533387@gandalf.local.home> In-Reply-To: <20240131105847.3e9afcb8@gandalf.local.home> References: <202401291043.e62e89dc-oliver.sang@intel.com> <20240129152600.7587d1aa@gandalf.local.home> <20240129172200.1725f01b@gandalf.local.home> <20240129174950.5a17a86c@gandalf.local.home> <20240129193549.265f32c8@gandalf.local.home> <20240130132319.022817e8@gandalf.local.home> <20240130143734.31b9b3f1@gandalf.local.home> <20240131105847.3e9afcb8@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (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=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 31 Jan 2024 10:58:47 -0500 Steven Rostedt wrote: > BTW, I ran my full test suite on your patches with the below updates and it > all passed. Note, I did not run the "bisectable" portion of my test. That > is, the part that runs tests on each patch in the series. Because I know > that fails. I just ran the tests on the last applied patch. > > I can break up and clean up the patches so that they are bisectable, and if > that passes the bisectable portion of my tests, I can still send them to > you for 6.8. I think this does fix a lot of hidden bugs, and would like all > this to go back to 6.6 when the eventfs was first introduced. So I swapped the order of patch 5 and patch 6, and it appears that patch 6 works without 5 (with some massaging). Here's the new patch 6 without patch 5, and now patch 5 just finishes the rest of the changes. I'll post this series, pull it in through my normal work flow, and rerun the full test suite with the bisecting check as well. -- Steve diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 0289ec787367..0213a3375d53 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -378,13 +378,12 @@ static void free_ei(struct eventfs_inode *ei) } /** - * eventfs_set_ei_status_free - remove the dentry reference from an eventfs_inode - * @ti: the tracefs_inode of the dentry + * eventfs_d_release - dentry is going away * @dentry: dentry which has the reference to remove. * * Remove the association between a dentry from an eventfs_inode. */ -void eventfs_set_ei_status_free(struct tracefs_inode *ti, struct dentry *dentry) +void eventfs_d_release(struct dentry *dentry) { struct eventfs_inode *ei; int i; diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index f403d32bd7cd..cf90ea86baf8 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -377,21 +377,30 @@ static const struct super_operations tracefs_super_operations = { .show_options = tracefs_show_options, }; -static void tracefs_dentry_iput(struct dentry *dentry, struct inode *inode) +/* + * It would be cleaner if eventfs had its own dentry ops. + * + * Note that d_revalidate is called potentially under RCU, + * so it can't take the eventfs mutex etc. It's fine - if + * we open a file just as it's marked dead, things will + * still work just fine, and just see the old stale case. + */ +static void tracefs_d_release(struct dentry *dentry) { - struct tracefs_inode *ti; + if (dentry->d_fsdata) + eventfs_d_release(dentry); +} - if (!dentry || !inode) - return; +static int tracefs_d_revalidate(struct dentry *dentry, unsigned int flags) +{ + struct eventfs_inode *ei = dentry->d_fsdata; - ti = get_tracefs(inode); - if (ti && ti->flags & TRACEFS_EVENT_INODE) - eventfs_set_ei_status_free(ti, dentry); - iput(inode); + return !(ei && ei->is_freed); } static const struct dentry_operations tracefs_dentry_operations = { - .d_iput = tracefs_dentry_iput, + .d_revalidate = tracefs_d_revalidate, + .d_release = tracefs_d_release, }; static int trace_fill_super(struct super_block *sb, void *data, int silent) diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h index 9e64ca4829c7..687faba9807b 100644 --- a/fs/tracefs/internal.h +++ b/fs/tracefs/internal.h @@ -77,6 +77,7 @@ struct dentry *tracefs_start_creating(const char *name, struct dentry *parent); struct dentry *tracefs_end_creating(struct dentry *dentry); struct dentry *tracefs_failed_creating(struct dentry *dentry); struct inode *tracefs_get_inode(struct super_block *sb); -void eventfs_set_ei_status_free(struct tracefs_inode *ti, struct dentry *dentry); + +void eventfs_d_release(struct dentry *dentry); #endif /* _TRACEFS_INTERNAL_H */