From patchwork Tue Sep 29 20:25:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 289356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 595ADC47431 for ; Tue, 29 Sep 2020 20:39:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04C702074B for ; Tue, 29 Sep 2020 20:39:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hcqY4Eb9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mBgOGD8k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729632AbgI2UjY (ORCPT ); Tue, 29 Sep 2020 16:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729457AbgI2UgA (ORCPT ); Tue, 29 Sep 2020 16:36:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FC5C0613D1; Tue, 29 Sep 2020 13:35:59 -0700 (PDT) Message-Id: <20200929203501.078203643@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601411758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=1mw81ufRFRCp2aG/qoi440f0F5QAZ6+ab8RMphLuW6Y=; b=hcqY4Eb9BwH9ixOQkW8m/7oDwSHLfLRLg1XMSyoqwIgaydn66YsMUihz1+PNHaha23NQZO a0Ap+7uA/aypW0fQGPvz5tdjc6PdvdCwNGk2HMMDUkKZ5QTEzQ+uDNUifZzlqoyGS4u//d f5UdDNCJ4Yr6SwdVvT/4iKWqBc2w/nX1uCRzq1zlktjkKhmBG8bB8XYUu2BNsVyBAQ88df LszRwEsqyCwGBZsJTI8724R6lAFGDfzwgX5xvOvk7nUb8xlXcoQW0/wndxocTfdp4tbFQF OGMWHdcMaVfPMVvv5j6zC9Lv2R4pL/4aPTP+duweRv90SvMhQQ7oTc4sQ1ugEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601411758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=1mw81ufRFRCp2aG/qoi440f0F5QAZ6+ab8RMphLuW6Y=; b=mBgOGD8k4/NRFUrOKoSz6C+5WUL/ao2yEae+dB33cW5vi9ywdOUwBcwK7CF0jDMJFZwPIn q0TVSbFzFe0ipPDg== Date: Tue, 29 Sep 2020 22:25:25 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Paul McKenney , Matthew Wilcox , Christian Benvenuti , Govindarajulu Varadarajan <_govind@gmx.com>, Dave Miller , Jakub Kicinski , netdev@vger.kernel.org, Jonathan Corbet , Mauro Carvalho Chehab , linux-doc@vger.kernel.org, Sebastian Andrzej Siewior , Luc Van Oostenryck , Jay Cliburn , Chris Snook , Vishal Kulkarni , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, Shannon Nelson , Pensando Drivers , Andrew Lunn , Heiner Kallweit , Russell King , Thomas Bogendoerfer , Solarflare linux maintainers , Edward Cree , Martin Habets , Jon Mason , Daniel Drake , Ulrich Kunitz , Kalle Valo , linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Stanislav Yakovlev , Stanislaw Gruszka , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Jouni Malinen , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , libertas-dev@lists.infradead.org, Pascal Terjan , Ping-Ke Shih Subject: [patch V2 16/36] net: sfc: Use GFP_KERNEL in efx_ef10_try_update_nic_stats() References: <20200929202509.673358734@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sebastian Andrzej Siewior efx_ef10_try_update_nic_stats_vf() is now only invoked from thread context and can sleep after efx::stats_lock is dropped. Change the allocation mode from GFP_ATOMIC to GFP_KERNEL. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Martin Habets --- V2: Adjust to Edward's stats update split --- drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -1873,7 +1873,7 @@ static int efx_ef10_try_update_nic_stats efx_ef10_get_stat_mask(efx, mask); - rc = efx_nic_alloc_buffer(efx, &stats_buf, dma_len, GFP_ATOMIC); + rc = efx_nic_alloc_buffer(efx, &stats_buf, dma_len, GFP_KERNEL); if (rc) { spin_lock_bh(&efx->stats_lock); return rc;