[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <3f644cb5-887b-1b29-3d5e-e58967f9f6fe@linux.vnet.ibm.com>
Date: Mon, 12 Mar 2018 14:06:56 -0500
From: John Allen <jallen@...ux.vnet.ibm.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org,
Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>,
Nathan Fontenot <nfont@...ux.vnet.ibm.com>
Subject: Re: [PATCH net-next] ibmvnic: Bail from ibmvnic_open if driver is
already open
On 03/12/2018 02:01 PM, Andrew Lunn wrote:
> On Mon, Mar 12, 2018 at 01:47:51PM -0500, John Allen wrote:
>> If the driver is already in the "open" state, don't attempt the procedure
>> for opening the driver.
>>
>> Signed-off-by: John Allen <jallen@...ux.vnet.ibm.com>
>> ---
>> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
>> index 7be4b06..98c4f75 100644
>> --- a/drivers/net/ethernet/ibm/ibmvnic.c
>> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
>> @@ -1057,6 +1057,9 @@ static int ibmvnic_open(struct net_device *netdev)
>>
>> mutex_lock(&adapter->reset_lock);
>>
>> + if (adapter->state == VNIC_OPEN)
>> + return 0;
>> +
>
> I've not looked at the actual code, but what about the lock it just
> took and does not unlock before returning?
Ah yes, I missed that. I will update and send a new version.
>
> Andrew
>
Powered by blists - more mailing lists