From 52a312673aff9baac0d677e0aee068d65dc30467 Mon Sep 17 00:00:00 2001
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Fri, 5 Oct 2018 21:55:46 +0800
Subject: [Backport 52a312673aff] iwlegacy: Add a lock assertion in
il4965_send_rxon_assoc()
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 <baijiaju1990@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
src/4965.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/4965.c b/src/4965.c
index c3c638ed0ed72e8c2f6c95929afc445f5c361d84..ce4144a892173a14e24bd8cd9e660732e96a8e60 100644
--- a/src/4965.c
+++ b/src/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.31.1