From patchwork Wed Feb 10 00:42:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 379796 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 13949C433E6 for ; Wed, 10 Feb 2021 00:48:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C475E64E50 for ; Wed, 10 Feb 2021 00:48:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234606AbhBJAre (ORCPT ); Tue, 9 Feb 2021 19:47:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234470AbhBJApW (ORCPT ); Tue, 9 Feb 2021 19:45:22 -0500 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99547C0617A7 for ; Tue, 9 Feb 2021 16:42:35 -0800 (PST) Received: by mail-ot1-x32e.google.com with SMTP id e4so283365ote.5 for ; Tue, 09 Feb 2021 16:42:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4ZnFgpWZW/pibsdLxTLSbnISeByhzyHarQxXUqXKzeg=; b=hItZCUkUv3hVP0EKFKWGCHiq7LK6jTKvkwxQLRTVv+G2duyo63PGIc8YpI3DXE6v6Q 93/TWf1dv1X8blaa5DeXeJ06ryE89D1TQkJDMHeu8+4PcwShh/BskEUrk4FnAjGukA1/ b6mCu9NEcGcDsOJPB1nb3PYD86+w1ds5Zeedg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4ZnFgpWZW/pibsdLxTLSbnISeByhzyHarQxXUqXKzeg=; b=NwL/1rES0wBhck3d7JhWddAqKZif+9lbJOrxcUBBtE1Bg+9JSYA7Nz1R5X19o6+AwH ud5IgUzdibKam48/s3kYgELBDZ13vgNPVTsDMciOb9OhxP6mrByikFN/tgrqeZdNFdZU SUYd6zVc9BJUgpGgsRNoeXt3g49z5bApixykxu1GtRcatTrhAdfMm+GpbHZt7mWW0V8J tmUKLbU2/VzAT6xVf+tUTcBJ+9EEn6Q3gcVaMfXc+BDB/QwX6wr+Rtlw+MYKpUHRyKTv 6Lge2HySRiOb3jAfbvjX9ze12KU/jcOLOxxOwfIC0iwVgOPRAzSQ+nzky8WKrRoaTTvV fQow== X-Gm-Message-State: AOAM531f9BjggwF663TmfmPeUhUBqQA9ZhG++9okY1Kicq3HH0WMJgTN 5wIFRrUJ2ZBsR/D+2PdfoK3HrA== X-Google-Smtp-Source: ABdhPJweKOk0U05wNNP7z8KOUn9C3PAmUn3jmo0QzHPBvGkR1giuIk30fNASdJrHyDRZtCLGpIiDCQ== X-Received: by 2002:a9d:4e2:: with SMTP id 89mr259973otm.140.1612917755107; Tue, 09 Feb 2021 16:42:35 -0800 (PST) Received: from shuah-t480s.internal (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id s123sm103060oos.3.2021.02.09.16.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 16:42:34 -0800 (PST) From: Shuah Khan To: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: Shuah Khan , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] ath10k: change ath10k_offchan_tx_work() peer present msg to a warn Date: Tue, 9 Feb 2021 17:42:24 -0700 Message-Id: <3b1f71272d56ee1d7f567fbce13bdb56cc06d342.1612915444.git.skhan@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Based on the comment block in this function and the FIXME for this, peer being present for the offchannel tx is unlikely. Peer is deleted once tx is complete. Change peer present msg to a warn to detect this condition. Signed-off-by: Shuah Khan --- drivers/net/wireless/ath/ath10k/mac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index e815aab412d7..53f92945006f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3954,9 +3954,8 @@ void ath10k_offchan_tx_work(struct work_struct *work) spin_unlock_bh(&ar->data_lock); if (peer) - /* FIXME: should this use ath10k_warn()? */ - ath10k_dbg(ar, ATH10K_DBG_MAC, "peer %pM on vdev %d already present\n", - peer_addr, vdev_id); + ath10k_warn(ar, "peer %pM on vdev %d already present\n", + peer_addr, vdev_id); if (!peer) { ret = ath10k_peer_create(ar, NULL, NULL, vdev_id, From patchwork Wed Feb 10 00:42:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 379795 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 3F964C433E6 for ; Wed, 10 Feb 2021 00:49:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09F3764E57 for ; Wed, 10 Feb 2021 00:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234257AbhBJAtB (ORCPT ); Tue, 9 Feb 2021 19:49:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233767AbhBJApw (ORCPT ); Tue, 9 Feb 2021 19:45:52 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F755C061356 for ; Tue, 9 Feb 2021 16:42:37 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id k25so161571oik.13 for ; Tue, 09 Feb 2021 16:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MVSZTT1h7rg/Bji9PEZgBTdOFc1Uv4h/Ji7bDyaOHUI=; b=b2vrzFxHfxSWjiku00Fz3a6ecUxKY3t2TA0ZzSD7MG6YCM8ajrR7O2gxN7GLKC0rrC FVbuFVlPE0yeTOQlclSOdWDAZdh2akjPV49OJuSExxHxugqDN4N8XLofPBw9tHtZ205Y S3uPZv6Ya+G7CILfj3nxGLLgYE/xenGdXkgrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MVSZTT1h7rg/Bji9PEZgBTdOFc1Uv4h/Ji7bDyaOHUI=; b=mrRmCyyl32VZjt7cEAaepkPAH34gVsDRcMdF6dYVkxOXkGkQJbE4WGK/iL3tT82w6l cXejo1JowuIhQ4is9nH8/hG/4unWatsu1Hj1degXI6seNy3FDdNJMaRrqWDw4olCTOEx f+GtJ3pfFH2PtqZXObsPY7TRBaL0gmwWc/wAHka+iIv27jzoCGeuo/5JJKYvElCjJr9x cQVmYl+2jVPp7p+J2WBlUr1LIOios2NPL+1d9Y2oPykULVtAU9xNWORmezGSE75R8EL+ OwYQGzYwoW9W1pOdv4DA34q8q/QpPG6bcnWoynC31zFOWWi3iZww/QnjPmL+irwSNlaR wdjA== X-Gm-Message-State: AOAM5309RcrX5i3ZMvMpQclZEPPCbsnDGcwqTHEjx14jntR7NUhtFJyW iWjM6UUZMnBOU9THVVWYB2n6ig== X-Google-Smtp-Source: ABdhPJzy8O/u6gQ1mql56Asz4MrIdqm2ujZLVWA9B95vdv7w6LIFLxn2QJpAEovPx21tylnZEk7yJA== X-Received: by 2002:aca:8d0:: with SMTP id 199mr294690oii.94.1612917756994; Tue, 09 Feb 2021 16:42:36 -0800 (PST) Received: from shuah-t480s.internal (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id s123sm103060oos.3.2021.02.09.16.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 16:42:36 -0800 (PST) From: Shuah Khan To: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: Shuah Khan , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ath10k: detect conf_mutex held ath10k_drain_tx() calls Date: Tue, 9 Feb 2021 17:42:25 -0700 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org ath10k_drain_tx() must not be called with conf_mutex held as workers can use that also. Add check to detect conf_mutex held calls. Signed-off-by: Shuah Khan Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/net/wireless/ath/ath10k/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 53f92945006f..3545ce7dce0a 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4566,6 +4566,7 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, /* Must not be called with conf_mutex held as workers can use that also. */ void ath10k_drain_tx(struct ath10k *ar) { + WARN_ON(lockdep_is_held(&ar->conf_mutex)); /* make sure rcu-protected mac80211 tx path itself is drained */ synchronize_net();