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: <2025090429-snooze-womankind-77fb@gregkh>
Date: Thu, 4 Sep 2025 09:33:32 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Kuen-Han Tsai <khtsai@...gle.com>
Cc: krzysztof.kozlowski@...aro.org, prashanth.k@....qualcomm.com,
	Thinh.Nguyen@...opsys.com, s.hauer@...gutronix.de,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...nel.org
Subject: Re: [PATCH v2] usb: gadget: f_ecm: Fix ecm_opts->bound logic in bind
 path

On Thu, Sep 04, 2025 at 02:52:00PM +0800, Kuen-Han Tsai wrote:
> The bound flag in ecm_opts is being set to true even if
> gether_register_netdev() failed.
> 
> Move the assignment of ecm_opts->bound to after the success check to
> ensure the flag only reflects the true state. The race condition on this
> flag is not a concern because the caller, configfs_composite_bind(),
> binds functions sequentially.
> 
> Fixes: d65e6b6e884a ("usb: gadget: f_ecm: Always set current gadget in ecm_bind()")
> Cc: stable@...nel.org
> Signed-off-by: Kuen-Han Tsai <khtsai@...gle.com>
> ---
>  drivers/usb/gadget/function/f_ecm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_ecm.c b/drivers/usb/gadget/function/f_ecm.c
> index 027226325039..9f5ed6f32a62 100644
> --- a/drivers/usb/gadget/function/f_ecm.c
> +++ b/drivers/usb/gadget/function/f_ecm.c
> @@ -690,13 +690,14 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f)
>  
>  	if (!ecm_opts->bound) {
>  		status = gether_register_netdev(ecm_opts->net);
> -		ecm_opts->bound = true;
>  	}
>  
>  	mutex_unlock(&ecm_opts->lock);
>  	if (status)
>  		return status;
>  
> +	ecm_opts->bound = true;
> +
>  	ecm_string_defs[1].s = ecm->ethaddr;
>  
>  	us = usb_gstrings_attach(cdev, ecm_strings,
> -- 
> 2.51.0.338.gd7d06c2dae-goog
> 
> 


Hi,

This is the friendly semi-automated patch-bot of Greg Kroah-Hartman.
You have sent him a patch that has triggered this response.

Right now, the development tree you have sent a patch for is "closed"
due to the timing of the merge window.  Don't worry, the patch(es) you
have sent are not lost, and will be looked at after the merge window is
over (after the -rc1 kernel is released by Linus).

So thank you for your patience and your patches will be reviewed at this
later time, you do not have to do anything further, this is just a short
note to let you know the patch status and so you don't worry they didn't
make it through.

thanks,

greg k-h's patch email bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ