From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH net-next v2 1/5] net: aquantia: Ethtool based ring size configuration Date: Mon, 4 Jun 2018 16:00:24 -0700 Message-ID: <20180604160024.7a8c7296@cakuba.netronome.com> References: <5f24d3f28fe0014c33fde9a20af547cd3b9f8d9d.1528150073.git.igor.russkikh@aquantia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , netdev@vger.kernel.org, David Arcari , Pavel Belous , Anton Mikaev To: Igor Russkikh Return-path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:36848 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbeFDXA3 (ORCPT ); Mon, 4 Jun 2018 19:00:29 -0400 Received: by mail-qt0-f195.google.com with SMTP id o9-v6so462352qtp.3 for ; Mon, 04 Jun 2018 16:00:28 -0700 (PDT) In-Reply-To: <5f24d3f28fe0014c33fde9a20af547cd3b9f8d9d.1528150073.git.igor.russkikh@aquantia.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 5 Jun 2018 01:30:15 +0300, Igor Russkikh wrote: > @@ -158,6 +158,8 @@ static void aq_nic_service_timer_cb(struct timer_list *t) > int ctimer = AQ_CFG_SERVICE_TIMER_INTERVAL; > int err = 0; > > + 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.