[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50cc4a00-1c4c-6e16-c8cf-e9b69d5714d5@aquantia.com>
Date: Tue, 5 Jun 2018 02:35:52 +0300
From: Igor Russkikh <igor.russkikh@...antia.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
David Arcari <darcari@...hat.com>,
Pavel Belous <pavel.belous@...antia.com>,
Anton Mikaev <amikaev@...antia.com>
Subject: Re: [PATCH net-next v2 1/5] net: aquantia: Ethtool based ring size
configuration
>> + mutex_lock(&self->aq_mutex);
>> +
>> if (aq_utils_obj_test(&self->flags, AQ_NIC_FLAGS_IS_NOT_READY))
>> goto err_exit;
>>
>> @@ -175,6 +177,7 @@ static void aq_nic_service_timer_cb(struct timer_list *t)
>> ctimer = max(ctimer / 2, 1);
>>
>> err_exit:
>> + mutex_unlock(&self->aq_mutex);
>> mod_timer(&self->service_timer, jiffies + ctimer);
>> }
>>
>
> This looks like a timer callback from the prototype, I don't think you
> can take mutexes in timer callbacks.
True as well. Eventually, think we may just get rid of mutex inside of this callback.
Mutex then will only serve to prevent possible parallel `ethtool -G` collisions from happening.
BR, Igor
Powered by blists - more mailing lists