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: <df4c25ac-8929-434a-9363-2d3761f8fafa@redhat.com>
Date: Wed, 19 Mar 2025 08:50:44 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: edward.cree@....com, linux-net-drivers@....com, davem@...emloft.net,
 kuba@...nel.org, edumazet@...gle.com, horms@...nel.org, andrew+netdev@...n.ch
Cc: Edward Cree <ecree.xilinx@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] sfc: support X4 devlink flash

On 3/17/25 4:00 PM, edward.cree@....com wrote:
> diff --git a/drivers/net/ethernet/sfc/efx_reflash.c b/drivers/net/ethernet/sfc/efx_reflash.c
> index ddc53740f098..bc96dd29b675 100644
> --- a/drivers/net/ethernet/sfc/efx_reflash.c
> +++ b/drivers/net/ethernet/sfc/efx_reflash.c
> @@ -407,31 +407,40 @@ int efx_reflash_flash_firmware(struct efx_nic *efx, const struct firmware *fw,
>  		return -EOPNOTSUPP;
>  	}
>  
> -	devlink_flash_update_status_notify(devlink, "Checking update", NULL, 0, 0);
> +	mutex_lock(&efx->reflash_mutex);
>  
> -	rc = efx_reflash_parse_firmware_data(fw, &type, &data_subtype, &data,
> -					     &data_size);
> -	if (rc) {
> -		NL_SET_ERR_MSG_MOD(extack,
> -				   "Firmware image validation check failed");
> -		goto out;
> -	}
> +	devlink_flash_update_status_notify(devlink, "Checking update", NULL, 0, 0);
>  
> -	mutex_lock(&efx->reflash_mutex);
> +	if (efx->type->flash_auto_partition) {
> +		/* NIC wants entire FW file including headers;
> +		 * FW will validate 'subtype' if there is one
> +		 */
> +		type = NVRAM_PARTITION_TYPE_AUTO;
> +		data = fw->data;
> +		data_size = fw->size;
> +	} else {
> +		rc = efx_reflash_parse_firmware_data(fw, &type, &data_subtype, &data,
> +						     &data_size);
> +		if (rc) {
> +			NL_SET_ERR_MSG_MOD(extack,
> +					   "Firmware image validation check failed");

Not a full code review, but on this error path the reflash_mutex is
apparently not released.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ