lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231102111426.5ca004d4f8fce591b536708c@kernel.org>
Date:   Thu, 2 Nov 2023 11:14:26 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ajay Kaher <akaher@...are.com>
Subject: Re: [PATCH v6 7/8] eventfs: Remove special processing of dput() of
 events directory

On Wed, 01 Nov 2023 13:25:48 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
> 
> The top level events directory is no longer special with regards to how it
> should be delete. Remove the extra processing for it in
> eventfs_set_ei_status_free().
> 
Looks good to me.

Reviewed-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

> Cc: Ajay Kaher <akaher@...are.com>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> Changes since v5: https://lkml.kernel.org/r/20231031223421.185413077@goodmis.org
> 
> - Resynced to this patch series
> 
>  fs/tracefs/event_inode.c | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
> index 0a04ae0ca8c8..0087a3f455f1 100644
> --- a/fs/tracefs/event_inode.c
> +++ b/fs/tracefs/event_inode.c
> @@ -274,28 +274,11 @@ static void free_ei(struct eventfs_inode *ei)
>   */
>  void eventfs_set_ei_status_free(struct tracefs_inode *ti, struct dentry *dentry)
>  {
> -	struct tracefs_inode *ti_parent;
>  	struct eventfs_inode *ei;
>  	int i;
>  
> -	/* The top level events directory may be freed by this */
> -	if (unlikely(ti->flags & TRACEFS_EVENT_TOP_INODE)) {
> -		mutex_lock(&eventfs_mutex);
> -		ei = ti->private;
> -		/* Nothing should access this, but just in case! */
> -		ti->private = NULL;
> -		mutex_unlock(&eventfs_mutex);
> -
> -		free_ei(ei);
> -		return;
> -	}
> -
>  	mutex_lock(&eventfs_mutex);
>  
> -	ti_parent = get_tracefs(dentry->d_parent->d_inode);
> -	if (!ti_parent || !(ti_parent->flags & TRACEFS_EVENT_INODE))
> -		goto out;
> -
>  	ei = dentry->d_fsdata;
>  	if (!ei)
>  		goto out;
> @@ -920,6 +903,8 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
>  	inode->i_op = &eventfs_root_dir_inode_operations;
>  	inode->i_fop = &eventfs_file_operations;
>  
> +	dentry->d_fsdata = ei;
> +
>  	/* directory inodes start off with i_nlink == 2 (for "." entry) */
>  	inc_nlink(inode);
>  	d_instantiate(dentry, inode);
> -- 
> 2.42.0


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ