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: <c9b9eab726fda392d05f8e56fd2ccb11@imap.linux.ibm.com>
Date:   Mon, 12 Apr 2021 09:25:34 -0700
From:   Dany Madden <drt@...ux.ibm.com>
To:     Lijun Pan <ljp@...ux.vnet.ibm.com>
Cc:     netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
        Rick Lindsley <ricklind@...ux.ibm.com>,
        Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
Subject: Re: [PATCH] ibmvnic: Continue with reset if set link down failed

On 2021-04-05 23:46, Lijun Pan wrote:
>> On Apr 5, 2021, at 10:47 PM, Dany Madden <drt@...ux.ibm.com> wrote:
>> 
>> When an adapter is going thru a reset, it maybe in an unstable state 
>> that
>> makes a request to set link down fail. In such a case, the adapter 
>> needs
>> to continue on with reset to bring itself back to a stable state.
>> 
>> Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
>> Signed-off-by: Dany Madden <drt@...ux.ibm.com>
>> ---
>> drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
>> b/drivers/net/ethernet/ibm/ibmvnic.c
>> index 9c6438d3b3a5..e4f01a7099a0 100644
>> --- a/drivers/net/ethernet/ibm/ibmvnic.c
>> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
>> @@ -1976,8 +1976,10 @@ static int do_reset(struct ibmvnic_adapter 
>> *adapter,
>> 			rtnl_unlock();
>> 			rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_DN);
>> 			rtnl_lock();
>> -			if (rc)
>> -				goto out;
>> +			if (rc) {
>> +				netdev_dbg(netdev,
>> +					   "Setting link down failed rc=%d. Continue anyway\n", rc);
>> +			}
> 
> What’s the point of checking the return code if it can be neglected 
> anyway?
> If we really don’t care if set_link_state succeeds or not, we don’t
> even need to call
> set_link_state() here.
> It seems more correct to me that we find out why set_link_state fails
> and fix it from that end.
> 
> Lijun
> 
>> 
>> 			if (adapter->state == VNIC_OPEN) {
>> 				/* When we dropped rtnl, ibmvnic_open() got
>> --
>> 2.26.2
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ