diff mbox series

net: wireless: iwlegacy: Add a lock assertion in il4965_send_rxon_assoc()

Message ID 20181005135546.21011-1-baijiaju1990@gmail.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series net: wireless: iwlegacy: Add a lock assertion in il4965_send_rxon_assoc() | expand

Commit Message

Jia-Ju Bai Oct. 5, 2018, 1:55 p.m. UTC
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>
---
 drivers/net/wireless/intel/iwlegacy/4965.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stanislaw Gruszka Oct. 8, 2018, 8:54 a.m. UTC | #1
On Fri, Oct 05, 2018 at 09:55:46PM +0800, Jia-Ju Bai wrote:
> 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>
Kalle Valo Oct. 13, 2018, 5:02 p.m. UTC | #2
Jia-Ju Bai <baijiaju1990@gmail.com> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

52a312673aff iwlegacy: Add a lock assertion in il4965_send_rxon_assoc()
diff mbox series

Patch

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 &&