All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH 2/3] mac80211: create a STA entry for a WDS interface after receiving a beacon
Date: Tue, 31 May 2011 22:05:57 +0200	[thread overview]
Message-ID: <1306872357.29989.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4DE54596.8090003@openwrt.org>

On Tue, 2011-05-31 at 21:46 +0200, Felix Fietkau wrote:
> On 2011-05-31 9:31 PM, Johannes Berg wrote:
> > On Tue, 2011-05-31 at 21:16 +0200, Felix Fietkau wrote:
> >
> >>  +	rcu_read_lock();
> >>  +
> >>  +	sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
> >>  +
> >>  +	if (!sta) {
> >>  +		rcu_read_unlock();
> >>  +		sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
> >>  +				     GFP_KERNEL);
> >>  +		if (!sta)
> >>  +			return;
> >>  +
> >>  +		new = true;
> >>  +	}
> >
> > ...
> >
> >>  +	rcu_read_unlock();
> >
> > definitely doesn't look right.
> It's a bit weird because in the case of a new sta being allocated, the 
> rcu read lock is acquired by sta_info_insert_rcu, and the code inbetween 
> does not need to be covered by the rcu read lock as the sta entry has 
> not been added to the list yet.
> It should be correct though, unless I'm missing something...

Oh right, I forgot about that.

johannes


  reply	other threads:[~2011-05-31 20:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 19:16 [PATCH 1/3] mac80211: remove the useless WLAN_STA_WDS station flag Felix Fietkau
2011-05-31 19:16 ` [PATCH 2/3] mac80211: create a STA entry for a WDS interface after receiving a beacon Felix Fietkau
2011-05-31 19:16   ` [PATCH 3/3] mac80211: receive action frames for WDS interfaces Felix Fietkau
2011-05-31 19:31   ` [PATCH 2/3] mac80211: create a STA entry for a WDS interface after receiving a beacon Johannes Berg
2011-05-31 19:46     ` Felix Fietkau
2011-05-31 20:05       ` Johannes Berg [this message]
2011-05-31 19:32   ` Johannes Berg
2011-05-31 19:39     ` Felix Fietkau
2011-05-31 20:06       ` Johannes Berg
2011-05-31 20:22         ` Felix Fietkau
2011-06-01  4:17           ` Johannes Berg
2011-06-01 10:53             ` Felix Fietkau
2011-06-01 11:02               ` Johannes Berg
2011-06-01 11:18                 ` Felix Fietkau
2011-06-01 11:30                   ` Johannes Berg
2011-06-01 11:41                     ` Felix Fietkau
2011-06-01 12:26                       ` Johannes Berg
2011-06-01 12:48                         ` Felix Fietkau
2011-06-06 18:24                           ` John W. Linville

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=1306872357.29989.2.camel@jlt3.sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.