Skip to content

Commit

Permalink
iwlegacy: Add a lock assertion in il4965_send_rxon_assoc()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
XidianGeneral authored and Kalle Valo committed Oct 13, 2018
1 parent 2258ee5 commit 52a3126
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/intel/iwlegacy/4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 52a3126

Please sign in to comment.