public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Felix Fietkau <nbd@openwrt.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix rcu locking
Date: Fri, 20 Nov 2009 10:09:14 +0100	[thread overview]
Message-ID: <1258708154.7094.41.camel@johannes.local> (raw)

Add a missing rcu_read_unlock() before jumping out
of the ieee80211_change_station() function in the
error case.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
*points finger at*

  commit fed1557d868e3a15b8a10700f79353e1f362e3a1
  Author: Felix Fietkau <nbd@openwrt.org>
  Date:   Tue Nov 10 20:10:05 2009 +0100

      mac80211: implement support for 4-address frames for AP and client mode

 net/mac80211/cfg.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- wireless-testing.orig/net/mac80211/cfg.c	2009-11-20 10:04:21.000000000 +0100
+++ wireless-testing/net/mac80211/cfg.c	2009-11-20 10:04:37.000000000 +0100
@@ -818,8 +818,10 @@ static int ieee80211_change_station(stru
 		}
 
 		if (params->vlan->ieee80211_ptr->use_4addr) {
-			if (vlansdata->u.vlan.sta)
+			if (vlansdata->u.vlan.sta) {
+				rcu_read_unlock();
 				return -EBUSY;
+			}
 
 			rcu_assign_pointer(vlansdata->u.vlan.sta, sta);
 		}



                 reply	other threads:[~2009-11-20  9:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1258708154.7094.41.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.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