From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexander Simon <an.alexsimon@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] mac80211: unlock on error path in ieee80211_ibss_join()
Date: Thu, 08 Dec 2011 06:49:03 +0000 [thread overview]
Message-ID: <20111208064903.GA16735@elgon.mountain> (raw)
We recently introduced a new return here but it needs an unlock first.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 3f830ac..0fc9752 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -993,8 +993,10 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
if (params->channel_fixed) {
sdata->local->oper_channel = params->channel;
if (!ieee80211_set_channel_type(sdata->local, sdata,
- params->channel_type))
+ params->channel_type)) {
+ mutex_unlock(&sdata->u.ibss.mtx);
return -EINVAL;
+ }
}
if (params->ie) {
next reply other threads:[~2011-12-08 6:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 6:49 Dan Carpenter [this message]
2011-12-08 8:16 ` [patch] mac80211: unlock on error path in ieee80211_ibss_join() 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=20111208064903.GA16735@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=an.alexsimon@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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