linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 04/14] wifi: cfg80211: wext: hold wiphy lock in siwgenie
Date: Tue,  6 Jun 2023 14:49:23 +0200	[thread overview]
Message-ID: <20230606144753.82cc542296a6.I2d480428b7314ab4407fa55e73c0e289692e59b8@changeid> (raw)
In-Reply-To: <20230606124933.181107-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg@intel.com>

Missed this ioctl since it's in wext-sme.c where we
usually get via a front-level ioctl handler in the
other files, but it should also hold the wiphy lock
to align the locking contract towards the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/wext-sme.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index f231207ca210..f3eaa3388694 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -3,7 +3,7 @@
  * cfg80211 wext compat for managed mode.
  *
  * Copyright 2009	Johannes Berg <johannes@sipsolutions.net>
- * Copyright (C) 2009, 2020-2022 Intel Corporation
+ * Copyright (C) 2009, 2020-2023 Intel Corporation
  */
 
 #include <linux/export.h>
@@ -338,6 +338,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
 	if (!ie_len)
 		ie = NULL;
 
+	wiphy_lock(wdev->wiphy);
 	wdev_lock(wdev);
 
 	/* no change */
@@ -370,6 +371,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
 	err = 0;
  out:
 	wdev_unlock(wdev);
+	wiphy_unlock(wdev->wiphy);
 	return err;
 }
 
-- 
2.40.1


  parent reply	other threads:[~2023-06-06 12:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 12:49 [PATCH 00/14] wifi: work cleanups part 1 Johannes Berg
2023-06-06 12:49 ` [PATCH 01/14] wifi: cfg80211: hold wiphy lock in auto-disconnect Johannes Berg
2023-06-06 12:49 ` [PATCH 02/14] wifi: cfg80211: hold wiphy lock in pmsr work Johannes Berg
2023-06-06 12:49 ` [PATCH 03/14] wifi: cfg80211: move wowlan disable under locks Johannes Berg
2023-06-06 12:49 ` Johannes Berg [this message]
2023-06-06 12:49 ` [PATCH 05/14] wifi: cfg80211: hold wiphy lock when sending wiphy Johannes Berg
2023-06-06 12:49 ` [PATCH 06/14] wifi: cfg80211: add a work abstraction with special semantics Johannes Berg
2023-06-06 12:49 ` [PATCH 07/14] wifi: mac80211: use wiphy work for sdata->work Johannes Berg
2023-06-06 12:49 ` [PATCH 08/14] wifi: mac80211: unregister netdevs through cfg80211 Johannes Berg
2023-06-06 12:49 ` [PATCH 09/14] wifi: mac80211: use wiphy work for SMPS Johannes Berg
2023-06-06 12:49 ` [PATCH 10/14] wifi: mac80211: use wiphy work for channel switch Johannes Berg
2023-06-06 12:49 ` [PATCH 11/14] wifi: mac80211: ibss: move disconnect to wiphy work Johannes Berg
2023-06-06 12:49 ` [PATCH 12/14] wifi: mac80211: mlme: move disconnects " Johannes Berg
2023-06-06 12:49 ` [PATCH 13/14] wifi: cfg80211: move sched scan stop " Johannes Berg
2023-06-06 13:08   ` Johannes Berg
2023-06-06 12:49 ` [PATCH 14/14] wifi: cfg80211: move scan done work " Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230606144753.82cc542296a6.I2d480428b7314ab4407fa55e73c0e289692e59b8@changeid \
    --to=johannes@sipsolutions.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).