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: <Z_WfuMDl2IIxYEOd@google.com>
Date: Tue, 8 Apr 2025 15:14:16 -0700
From: Joel Becker <jlbec@...lplan.org>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
	Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org,
	Zijun Hu <quic_zijuhu@...cinc.com>, stable@...r.kernel.org
Subject: Re: [PATCH 2/4] configfs: Do not override creating attribute file
 failure in populate_attrs()

On Tue, Apr 08, 2025 at 09:26:08PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
> 
> populate_attrs() may override failure for creating attribute files
> by success for creating subsequent bin attribute files, and have
> wrong return value.
> 
> Fix by creating bin attribute files under successfully creating
> attribute files.
> 
> Fixes: 03607ace807b ("configfs: implement binary attributes")
> Cc: stable@...r.kernel.org
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>

Reviewed-by: Joel Becker <jlbec@...lplan.org>

> ---
>  fs/configfs/dir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
> index 0a011bdad98c492227859ff328d61aeed2071e24..64272d3946cc40757dca063190829958517eceb3 100644
> --- a/fs/configfs/dir.c
> +++ b/fs/configfs/dir.c
> @@ -619,7 +619,7 @@ static int populate_attrs(struct config_item *item)
>  				break;
>  		}
>  	}
> -	if (t->ct_bin_attrs) {
> +	if (!error && t->ct_bin_attrs) {
>  		for (i = 0; (bin_attr = t->ct_bin_attrs[i]) != NULL; i++) {
>  			if (ops && ops->is_bin_visible && !ops->is_bin_visible(item, bin_attr, i))
>  				continue;
> 
> -- 
> 2.34.1
> 

-- 

Life's Little Instruction Book #511

	"Call your mother."

			http://www.jlbec.org/
			jlbec@...lplan.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ