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: <aYu0WZ-xCZr-bmsq@slm.duckdns.org>
Date: Tue, 10 Feb 2026 12:42:33 -1000
From: Tejun Heo <tj@...nel.org>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: gregkh@...uxfoundation.org, driver-core@...ts.linux.dev,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	shuah@...nel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/3] kernfs: send IN_DELETE_SELF and IN_IGNORED on file
 deletion

On Mon, Feb 09, 2026 at 04:38:00PM -0800, T.J. Mercier wrote:
...
>  static void __kernfs_remove(struct kernfs_node *kn)
>  {
>  	struct kernfs_node *pos, *parent;
> @@ -1520,6 +1538,9 @@ static void __kernfs_remove(struct kernfs_node *kn)
>  			struct kernfs_iattrs *ps_iattr =
>  				parent ? parent->iattr : NULL;
>  
> +			if (kernfs_type(kn) == KERNFS_FILE)

kernfs_type(pos)?

> +				kernfs_notify_file_deleted(pos);
> +
...
> -static void kernfs_notify_workfn(struct work_struct *work)
> +static int fsnotify_self_event(int event)
> +{
> +	if (event == FS_DELETE)
> +		return FS_DELETE_SELF;
> +
> +	return event;
> +}
> +
> +void kernfs_notify_workfn(struct work_struct *work)
>  {
>  	struct kernfs_node *kn;
>  	struct kernfs_super_info *info;
>  	struct kernfs_root *root;
>  	u32 notify_event;
> +	u32 self_event;
>  repeat:
>  	/* pop one off the notify_list */
>  	spin_lock_irq(&kernfs_notify_lock);
> @@ -929,6 +938,8 @@ static void kernfs_notify_workfn(struct work_struct *work)
>  	kn->attr.notify_event = 0;
>  	spin_unlock_irq(&kernfs_notify_lock);
>  
> +	self_event = fsnotify_self_event(notify_event);

Maybe just inline the conversion?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ