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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4ea49b5-5515-4097-c879-afb60cc5c673@amd.com>
Date: Wed, 24 May 2023 14:52:48 +0100
From: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@....com>
To: Simon Horman <simon.horman@...igine.com>
Cc: netdev@...r.kernel.org, linux-net-drivers@....com, davem@...emloft.net,
 kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
 ecree.xilinx@...il.com, habetsm.xilinx@...il.com
Subject: Re: [PATCH net-next] sfc: handle VI shortage on ef100 by readjusting
 the channels



On 24/05/2023 11:09, Simon Horman wrote:
> On Wed, May 24, 2023 at 10:36:38AM +0100, Pieter Jansen van Vuuren wrote:
>> When fewer VIs are allocated than what is allowed we can readjust
>> the channels by calling efx_mcdi_alloc_vis() again.
>>
>> Signed-off-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@....com>
>> Reviewed-by: Martin Habets <habetsm.xilinx@...il.com>
> 
> Hi Pieter,
> 
> this patch looks good to me.
> 
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
> 
> But during the review I noticed that Smatch flags some
> problems in ef100_netdev.c that you may wish to address.
> Please see below.
> 
>> ---
>>  drivers/net/ethernet/sfc/ef100_netdev.c | 51 ++++++++++++++++++++++---
>>  1 file changed, 45 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c
>> index d916877b5a9a..c201e001f3b8 100644
>> --- a/drivers/net/ethernet/sfc/ef100_netdev.c
>> +++ b/drivers/net/ethernet/sfc/ef100_netdev.c
> 
...
>> +		/* It should be very unlikely that we failed here again, but in
>> +		 * such a case we return ENOSPC.
>> +		 */
>> +		if (rc == -EAGAIN) {
>> +			rc = -ENOSPC;
>> +			goto fail;
>> +		}
>> +	}
>> +
>>  	rc = efx_probe_channels(efx);
>>  	if (rc)
>>  		return rc;
> 
> Not strictly related to this patch, but Smatch says that on error this should
> probably free some resources. So perhaps:
> 
> 		goto fail;
> 
> Also not strictly related this patch, but Smatch also noticed that
> in ef100_probe_netdev net_dev does not seem to be freed on the error path.

Thank you for the review Simon. Yes, I think this requires some attention, I think
this is one of a few that we need to look at. So it will likely become a separate
patch set addressing Smatch issues.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ