public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Simon <an.alexsimon@googlemail.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mac80211: unlock on error path in ieee80211_ibss_join()
Date: Thu, 08 Dec 2011 08:16:05 +0000	[thread overview]
Message-ID: <1323332165.3332.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20111208064903.GA16735@elgon.mountain>

On Thu, 2011-12-08 at 09:49 +0300, Dan Carpenter wrote:
> We recently introduced a new return here but it needs an unlock first.

Thanks Dan! Bad Alex :-)

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



      reply	other threads:[~2011-12-08  8:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  6:49 [patch] mac80211: unlock on error path in ieee80211_ibss_join() Dan Carpenter
2011-12-08  8:16 ` Johannes Berg [this message]

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=1323332165.3332.0.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=an.alexsimon@googlemail.com \
    --cc=dan.carpenter@oracle.com \
    --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