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] [day] [month] [year] [list]
Message-ID: <ff0846cf-5226-466c-ac92-545c070fffd9@themaw.net>
Date: Wed, 3 Dec 2025 07:19:59 +0800
From: Ian Kent <raven@...maw.net>
To: Christian Brauner <brauner@...nel.org>, Al Viro
 <viro@...IV.linux.org.uk>, Kernel Mailing List
 <linux-kernel@...r.kernel.org>, autofs mailing list
 <autofs@...r.kernel.org>, linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 1/2] autofs: fix per-dentry timeout warning

Hey Christian,


Sorry to bother you but did this one get missed due to

the distraction of the discussion about patch 2?


Ian

On 11/11/25 14:04, Ian Kent wrote:
> The check that determines if the message that warns about the per-dentry
> timeout being greater than the super block timeout is not correct.
>
> The initial value for this field is -1 and the type of the field is
> unsigned long.
>
> I could change the type to long but the message is in the wrong place
> too, it should come after the timeout setting. So leave everything else
> as it is and move the message and check the timeout is actually set
> as an additional condition on issuing the message. Also fix the timeout
> comparison.
>
> Signed-off-by: Ian Kent <raven@...maw.net>
> ---
>   fs/autofs/dev-ioctl.c | 22 ++++++++++++----------
>   1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/fs/autofs/dev-ioctl.c b/fs/autofs/dev-ioctl.c
> index d8dd150cbd74..8adef8caa863 100644
> --- a/fs/autofs/dev-ioctl.c
> +++ b/fs/autofs/dev-ioctl.c
> @@ -449,16 +449,6 @@ static int autofs_dev_ioctl_timeout(struct file *fp,
>   		if (!autofs_type_indirect(sbi->type))
>   			return -EINVAL;
>   
> -		/* An expire timeout greater than the superblock timeout
> -		 * could be a problem at shutdown but the super block
> -		 * timeout itself can change so all we can really do is
> -		 * warn the user.
> -		 */
> -		if (timeout >= sbi->exp_timeout)
> -			pr_warn("per-mount expire timeout is greater than "
> -				"the parent autofs mount timeout which could "
> -				"prevent shutdown\n");
> -
>   		dentry = try_lookup_noperm(&QSTR_LEN(param->path, path_len),
>   					   base);
>   		if (IS_ERR_OR_NULL(dentry))
> @@ -487,6 +477,18 @@ static int autofs_dev_ioctl_timeout(struct file *fp,
>   			ino->flags |= AUTOFS_INF_EXPIRE_SET;
>   			ino->exp_timeout = timeout * HZ;
>   		}
> +
> +		/* An expire timeout greater than the superblock timeout
> +		 * could be a problem at shutdown but the super block
> +		 * timeout itself can change so all we can really do is
> +		 * warn the user.
> +		 */
> +		if (ino->flags & AUTOFS_INF_EXPIRE_SET &&
> +		    ino->exp_timeout > sbi->exp_timeout)
> +			pr_warn("per-mount expire timeout is greater than "
> +				"the parent autofs mount timeout which could "
> +				"prevent shutdown\n");
> +
>   		dput(dentry);
>   	}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ