From patchwork Tue Mar 9 08:42:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 396542 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 5FE8AC4161F for ; Tue, 9 Mar 2021 08:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41C0A65266 for ; Tue, 9 Mar 2021 08:46:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231351AbhCIIqW (ORCPT ); Tue, 9 Mar 2021 03:46:22 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:51468 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230424AbhCIIpm (ORCPT ); Tue, 9 Mar 2021 03:45:42 -0500 Message-Id: <20210309084242.313899703@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1615279541; 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=l6Q3W/LryXAjvWJbzAW7nw1Byy8ZW+Ak6BqUHfGdIYA=; b=wkfrvYWdeSxVkZZvGJrvJ5doa1FQOYEdrs9XtXy+47hkZr79UvWY+m+G9akaJQslI0Hptg sYnBZXRXHiw7V+qHXT2/S2jvkbUf9V5/ePXCILMMjFH3RnIgn2E2s1uSQJfYZt1fCK1XtD Of9D8bk7Jn0jf6Vpiom/NscjyJnL7uIE/s/W4ZKi2PExELJU0oOnY9lQc2U0/hwoX2RYTN aHrp25gQZLqCU9Nj3Xq0qHr8+J9S3Ya78w107pmK4K3X42rqInFgO/e7lGS2qOKPcIcw0w dw82CAulutJ4Psg1LyI6T7H3JYhWeQ1K6QVyGJzeEaDxAXlGa69vFi6ASruCrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1615279541; 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=l6Q3W/LryXAjvWJbzAW7nw1Byy8ZW+Ak6BqUHfGdIYA=; b=DTmNItlbUCzhKqosxEh/VQS7S4RBz18lFKbgeCay+vE0IyWWX0E4N9MzEuBG8k5h2jqMWK HqURayVmIpwdfoCg== Date: Tue, 09 Mar 2021 09:42:13 +0100 From: Thomas Gleixner To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , "Ahmed S. Darwish" , ath9k-devel@qca.qualcomm.com, Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Peter Zijlstra , Denis Kirjanov , Chas Williams <3chas3@gmail.com>, linux-atm-general@lists.sourceforge.net, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Stefan Richter , linux1394-devel@lists.sourceforge.net Subject: [patch 10/14] ath9k: Use tasklet_disable_in_atomic() References: <20210309084203.995862150@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 All callers of ath9k_beacon_ensure_primary_slot() are preemptible / acquire a mutex except for this callchain: spin_lock_bh(&sc->sc_pcu_lock); ath_complete_reset() -> ath9k_calculate_summary_state() -> ath9k_beacon_ensure_primary_slot() It's unclear how that can be distangled, so use tasklet_disable_in_atomic() for now. This allows tasklet_disable() to become sleepable once the remaining atomic users are cleaned up. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: ath9k-devel@qca.qualcomm.com Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Kalle Valo --- drivers/net/wireless/ath/ath9k/beacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -251,7 +251,7 @@ void ath9k_beacon_ensure_primary_slot(st int first_slot = ATH_BCBUF; int slot; - tasklet_disable(&sc->bcon_tasklet); + tasklet_disable_in_atomic(&sc->bcon_tasklet); /* Find first taken slot. */ for (slot = 0; slot < ATH_BCBUF; slot++) {