Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp477275imm; Fri, 5 Oct 2018 06:57:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63h6s8SGsQaNaa0dg3PlJPk0x1+/kqRtiA48M4jak1okl4L8T3LiiljVjoeOzepJ+T+ibTQ X-Received: by 2002:a63:906:: with SMTP id 6-v6mr10171169pgj.92.1538747859216; Fri, 05 Oct 2018 06:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538747859; cv=none; d=google.com; s=arc-20160816; b=1IouIt8GaZp9I6b0qiA5BNeozDu+E+oGutkrRRSBv5sHaBnQH9Mo945YtUxwdvFlTi MmtVcU7KRJnYeLON/eagp0Uy4PkiVAndDZLSQl0/oAOGy/38MKJLPFRprc0ruuI1gMSr RC3X/b2tfdlYjxeD0KZwkrtNlvL+xhjjJ6z+7vNfGLCd0D7GXe7bhT+5Age+ATWTiyZ6 8UdCQ09vhraX7YOqToAvRj2yDAGPbPYJ00xeYVS4YuCGoQ31YTRlCF7VwrgOaDT1HSq6 yTQuhJF8rk82IgKL8VNmmrG2S/1MUTH+l0fSqbfTu0fN4iS+DfcLD1TL04DLYZgZFIRb shYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ZJ3IGXH0brX7jc6O3u+EPbBsEwSKUB3OqsRntJHEE74=; b=hpEZ6ZEtu9IiZuABzGXGeMruhOajZY/Bp1urc/wc4FlXW8yPBWrvwKWBqHoi7m/jfa OUtrHXAsdsnPpHwbGpTxOGjQkUovG4/LbjtzF0qwMLYRxA9XZiuviwUQdyHrvqY6HuAO AMYY3h4PsW+C7cRNzYSThzrQfOPK8JQB2aQS8HgGXjxiKmXTPM/IbtNr2PIqnfegg+IU gytC1gWxh0ffC0kRok5L4IZ9I0jiURqi6yod5k9ZV0yPjyfpUmXAiWN3UMNJU0YI+nIQ y+q7jf/jAc6k/UfzeEaRFxRmvpEOEBO5QDJoJQ9OaiwVSTHEZJOI1AM4bBfj0Zw+jJ+G gFGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N1vak8b5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9-v6si10399322pfj.167.2018.10.05.06.57.23; Fri, 05 Oct 2018 06:57:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N1vak8b5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728921AbeJEUys (ORCPT + 99 others); Fri, 5 Oct 2018 16:54:48 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46040 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728407AbeJEUys (ORCPT ); Fri, 5 Oct 2018 16:54:48 -0400 Received: by mail-pg1-f193.google.com with SMTP id t70-v6so4766074pgd.12; Fri, 05 Oct 2018 06:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZJ3IGXH0brX7jc6O3u+EPbBsEwSKUB3OqsRntJHEE74=; b=N1vak8b5D47HTrlkt/KJpO43Vz1Fz3JASn6Va4wGY1zIjtNPEfLgIP7wL1nPxYuP2v unkNOb+GWmbMMc41hTnUr+RysQw+bLCYO0zklHOznb9DarKYG+yMnkr+ZwVDnmYFj8Pu 4UU+okgNKL3TZ79Yr3yDCqTKHECyK6r12bzSxX+hwZ53AG8t3uUFFB727tCW9XFNhC+3 60KgQN556XshhiSVNHwd2omPafCRQLFrGznvdpZlvtnXCKwdhMxWXvxXBjY+Fmya968r My1ghL5MBbcmPaxAofY7rHUtH/0bkK0wkBmwpZCSEVvZ9j/HHSHJf9ijjMkBa7WpV2+D 7D3g== 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; bh=ZJ3IGXH0brX7jc6O3u+EPbBsEwSKUB3OqsRntJHEE74=; b=JmNlChWZf4tq11HI8qsbAtcOpa8cJukW63BhwuSP2gZse1KDwNVB8ME85YK8Ls65+u Ut5KMtsa1f9alYvKtZlLCzi0C6NSv8eulZud5J7NhWQR3CCb0yJA5TeU2y2WgZ5ysQ29 atbWvOqvcJEq0FrgBRIrLdBCWdHnPHN0BRI2tgsW4kadUU+ZTzpluj+lLmwhyOE00ITw ihQvovAy42QNoEhlXUZKCHHxsVHHfj3rTqDr/xz07VBex18htes8tRHZ9EsrOh66qZxo 23Ugkp0/IQwY7I5MccTwuG24oibXgSAMDh6guqFjo8icAnlh1tzsGcaErPGZreDbLwM0 DaHQ== X-Gm-Message-State: ABuFfoipUQzAA+I020JUVgMukEvPvDkgSCHmSDETJXzEu8KBLzFGSLMf BHlO8Ia7gpTAF2QgJd9K3+A= X-Received: by 2002:a62:830e:: with SMTP id h14-v6mr12329045pfe.29.1538747757146; Fri, 05 Oct 2018 06:55:57 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:51be:f9f2:35c8:7b56]) by smtp.gmail.com with ESMTPSA id r73-v6sm17988049pfk.157.2018.10.05.06.55.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 06:55:56 -0700 (PDT) From: Jia-Ju Bai To: sgruszka@redhat.com, kvalo@codeaurora.org, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] net: wireless: iwlegacy: Add a lock assertion in il4965_send_rxon_assoc() Date: Fri, 5 Oct 2018 21:55:46 +0800 Message-Id: <20181005135546.21011-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variables il->staging.filter_flags, rxon1->filter_flags and rxon2->filter_flags need to be protected by the mutex lock il->mutex. This patch adds a lock assertion of il->mutex to check whether this lock is held. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/intel/iwlegacy/4965.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c index c3c638ed0ed7..ce4144a89217 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965.c +++ b/drivers/net/wireless/intel/iwlegacy/4965.c @@ -1297,6 +1297,8 @@ il4965_send_rxon_assoc(struct il_priv *il) const struct il_rxon_cmd *rxon1 = &il->staging; const struct il_rxon_cmd *rxon2 = &il->active; + lockdep_assert_held(&il->mutex); + if (rxon1->flags == rxon2->flags && rxon1->filter_flags == rxon2->filter_flags && rxon1->cck_basic_rates == rxon2->cck_basic_rates && -- 2.17.0