Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp460439lqp; Mon, 10 Jun 2024 09:08:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMdSgU4J6TYgOqucMF2whpZl2rpu3CjX1AjqxExk6mEdWTdg1KEWKtNpIRdrRYBVTVsPE6u2ctEr0VgTLj2sWNFbX54Fy50gaq//0t0w== X-Google-Smtp-Source: AGHT+IGibDOB1/nZxc76zif8mkeiYLs6WSEdVXTGP2xF1HNvhLtVLmRYbaZPnG65SKz2h3a8/ROA X-Received: by 2002:a17:903:11ce:b0:1f6:3b15:82a0 with SMTP id d9443c01a7336-1f6d03f13c7mr105107465ad.64.1718035717730; Mon, 10 Jun 2024 09:08:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718035717; cv=pass; d=google.com; s=arc-20160816; b=OevRcJU9C5R253p0NgLrjK9dGbqHLglSUrxWSK439wO3CjwivUJshy4QwUt2wqvpbs OuIUQhqYzmujmDzMLMEU4Bv6uZNc3roFHcSreVPaa2UGGSXsgdmyj4TVyLRhu8YrmcC3 t729MXbVK1TYD1WY0yvtvCAZFQOYz89SHKznRiCV6A0b9V/n4Dx7vY56DyZZL2u5t+Uk 0QbClLEXlRon1bZEDMiFMPJo1GB8U75i+sh1L7wj8YYkWI+LYg7j2JH4KfJRKZj5whJy 9K/qFJh/drndyuQ3OtmCNN2lNP21M3RBI7m7ZWBA6/+Xg4SeWya5wCyoRN/giHrsB7zh BRqQ== 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=qJxOIejbu5MfiU5iiS6SpyyFXQOru1YHptYdIx+Kphg=; fh=FnBzdDjzoiyRL5NA7EpC4X5XTZsOrHXz+BvzFkjjyTo=; b=xlvdTf5XT0vVfL0AtadVbWtL2rl7MIEog58uuuFQ6pUIVPoqZC4vVLkZnLn34L8eHA aaUYxj0OMu337Npvvb0r6jc6DbMgBkHhH+eF91WStZrosA8WtEei6d4bgC+K1hGoRIiS ibHvd4I/+FGRTx8/ir/ElmGCl5Hx/AHBRnhNYSmrgTRre5tTItyc/SSfT6PTqasEJZah fpCbQGUMB2v5LLne9MRZlLjxQTiIdwcRgo8taludrxtxo2pqbp7yihSmTeiHbTnw3laj uSTZsgil8OqeaVIC0B3DKaZGIQa0WzXyVwaXS6fYjIG2CDmh+5VUlxRW4CdI3QLdGGB2 tTyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208476-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208476-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7e4a72si56469135ad.374.2024.06.10.09.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 09:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208476-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208476-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208476-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3E0B8B2C0C5 for ; Mon, 10 Jun 2024 15:27:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 609E914F9F2; Mon, 10 Jun 2024 15:22:27 +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 CDB03135A58; Mon, 10 Jun 2024 15:22:26 +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=1718032946; cv=none; b=thvtKzmg15/zsOG1FpFm6mUf/onvvalf0KqyvzMN3V8KHuXZbsUxMY6/DcCGEiy7QYamBgQKiIvbDkodqlwx/wIXOZviTwmvuUZTQW7oNsQ4DQcBNEQIf5IUcWD+sf/Z5jaVHLXSVu5xzwjLEaI2YVQC59LGyQ6mEPCR5fAZRf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718032946; c=relaxed/simple; bh=fs/CUGRK42T1ZduMRBjsL7c/gZC5tVJMrLgdXvclfIc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FuhCvvb0sR9zL063mDVTVtfcL/tyMU4eiDPuXXdMZa4ft6wP8JrJCCmkmqbRd4KSnDWXRBO4Tk/OQco7drYCZPn+bluqKUq3Iw4ShbO6v6zsH1hJm1eqC816bQsfItHdwhvu7qNWksNBeazN5FWhqPHft1BlTWfCbh6d3vrelh4= 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 41345C2BBFC; Mon, 10 Jun 2024 15:22:25 +0000 (UTC) Date: Mon, 10 Jun 2024 11:22:23 -0400 From: Steven Rostedt To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, "Paul E . McKenney" , Vlastimil Babka Subject: Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback Message-ID: <20240610112223.151faf65@rorschach.local.home> In-Reply-To: <20240609082726.32742-6-Julia.Lawall@inria.fr> References: <20240609082726.32742-1-Julia.Lawall@inria.fr> <20240609082726.32742-6-Julia.Lawall@inria.fr> 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=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 9 Jun 2024 10:27:17 +0200 Julia Lawall wrote: > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > index 7c29f4afc23d..338c52168e61 100644 > --- a/fs/tracefs/inode.c > +++ b/fs/tracefs/inode.c > @@ -53,14 +53,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) > return &ti->vfs_inode; > } > > -static void tracefs_free_inode_rcu(struct rcu_head *rcu) > -{ > - struct tracefs_inode *ti; > - > - ti = container_of(rcu, struct tracefs_inode, rcu); > - kmem_cache_free(tracefs_inode_cachep, ti); Does this work? tracefs needs to be freed via the tracefs_inode_cachep. Does kfree_rcu() handle specific frees for objects that were not allocated via kmalloc()? -- Steve > -} > - > static void tracefs_free_inode(struct inode *inode) > { > struct tracefs_inode *ti = get_tracefs(inode); > @@ -70,7 +62,7 @@ static void tracefs_free_inode(struct inode *inode) > list_del_rcu(&ti->list); > spin_unlock_irqrestore(&tracefs_inode_lock, flags); > > - call_rcu(&ti->rcu, tracefs_free_inode_rcu); > + kfree_rcu(ti, rcu); > } > > static ssize_t default_read_file(struct file *file, char __user *buf,