Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8096061ybn; Tue, 1 Oct 2019 03:10:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzr8JooMi7awlvfQAVEenIFICwaaJBbuK7xuyVagBJ2tb3hr/VqKJvdPQWPRZBCYW9kn7ha X-Received: by 2002:a17:906:c282:: with SMTP id r2mr22026561ejz.207.1569924649643; Tue, 01 Oct 2019 03:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569924649; cv=none; d=google.com; s=arc-20160816; b=O3jy4bKavDwGl6T+Grg/BgfYFCIzOPb9SrRfYEFOXxjumh5bYw11fjEDXebtxkDgrU lTAEc3naevGYrAPXln8P7kPl5IKMwaMevoZlxWcOVU92IuK6gR4tDfTt05LNABnEeuiC opi71ISMiLmsvlXwb/2y+9ZkosD+IY/BEaNWRoS9qW+51E3xdRgvhxjA5IqhKSJ41Eb8 URDG5G08j7k87UrcgX4wB8orKI0q7CbRq/0xB76tCr+GZLJi1EP2IXpnRCu54sMEFDOQ EBdDYWF3hypIHJgeEzcNPM94ruM5WydCwaUSjzU6udsyHs3jEhzB8nznQD9bjp8TxXtQ wh6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vx2FzP7X01BU9R7Pz98ocNFkqP5u6D7vszZFidga2CM=; b=DWDIT/Y+Jie8RmkznsiQCWHfaFfGTOJJzTU8XUwDDcV/TQzRIqHdf4OKGAYK46Styq GeHehuXhaJ7ROtjxmZIaRCoWFEi/IAJ6EHIyoHqWxXvPE9VmU6NxfXRkvGAQ9RweUhde C9nGdIk3bb0c7cAq7gDyYmo+HmyYDChw1J1AF/lDu3qghbgFWOR6ACWau4yBiQ+mFxUS AXL5ilnwtMggRxhDOljruqpKojIDmYACfTvwuYOaaax80VSITPtrCdT9P2U0BBUh1ksp Z8uuxrJV88+JK/He1dQsVyAoJsvHN8fFiv3hsLp8+WrnTy1cCvfsOu8SNvb4PKnqxdYp yplQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si8785688edm.395.2019.10.01.03.10.22; Tue, 01 Oct 2019 03:10:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730142AbfJAKIV (ORCPT + 99 others); Tue, 1 Oct 2019 06:08:21 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:58626 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729841AbfJAKIU (ORCPT ); Tue, 1 Oct 2019 06:08:20 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1iFF4s-0004qc-5p; Tue, 01 Oct 2019 12:08:18 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Johannes Berg , Jiri Kosina , Aaron Hill , Lukas Redlinger , Oleksii Shevchuk Subject: [PATCH] mac80211: keep BHs disabled while calling drv_tx_wake_queue() Date: Tue, 1 Oct 2019 12:08:05 +0200 Message-Id: <1569924485-I3e8838c5ecad878e59d4a94eb069a90f6641461a@changeid> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Drivers typically expect this, as it's the case for almost all cases where this is called (i.e. from the TX path). Also, the code in mac80211 itself (if the driver calls ieee80211_tx_dequeue()) expects this as it uses this_cpu_ptr() without additional protection. This should fix various reports of the problem: https://bugzilla.kernel.org/show_bug.cgi?id=204127 https://lore.kernel.org/linux-wireless/CAN5HydrWb3o_FE6A1XDnP1E+xS66d5kiEuhHfiGKkLNQokx13Q@mail.gmail.com/ https://lore.kernel.org/lkml/nycvar.YFH.7.76.1909111238470.473@cbobk.fhfr.pm/ Reported-by: Jiri Kosina Reported-by: Aaron Hill Reported-by: Lukas Redlinger Reported-by: Oleksii Shevchuk Signed-off-by: Johannes Berg --- net/mac80211/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 051a02ddcb85..ad1e88958da2 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -273,9 +273,9 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac) &txqi->flags)) continue; - spin_unlock_bh(&fq->lock); + spin_unlock(&fq->lock); drv_wake_tx_queue(local, txqi); - spin_lock_bh(&fq->lock); + spin_lock(&fq->lock); } } -- 2.20.1