All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	pstew@chromium.org, linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: use rcu_read_lock before sta_info_get
Date: Sun, 25 Dec 2011 17:58:40 +0100	[thread overview]
Message-ID: <201112251758.41131.chunkeey@googlemail.com> (raw)
In-Reply-To: <1324825752-8186-1-git-send-email-mohammed@qca.qualcomm.com>

On Sunday 25 December 2011 16:09:12 Mohammed Shafi Shajakhan wrote:
> @@ -1385,7 +1385,9 @@ void ieee80211_beacon_connection_loss_work(struct work_struct *work)
>  	struct sta_info *sta;
>  
>  	if (ifmgd->associated) {
> +		rcu_read_lock();
>  		sta = sta_info_get(sdata, ifmgd->bssid);
> +		rcu_read_unlock();
>  		if (sta)
>  			sta->beacon_loss_count++;
>  	}

uh, I think it should be:

> +		rcu_read_lock();
>  		sta = sta_info_get(sdata, ifmgd->bssid);
>  		if (sta)
>  			sta->beacon_loss_count++;
> +		rcu_read_unlock();

Since we update a member of the rcu-protected "sta"
reference.

Regards,
	Chr

  reply	other threads:[~2011-12-25 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-25 15:09 [RFC] mac80211: use rcu_read_lock before sta_info_get Mohammed Shafi Shajakhan
2011-12-25 16:58 ` Christian Lamparter [this message]
2011-12-26  5:15   ` Mohammed Shafi Shajakhan
  -- strict thread matches above, loose matches on Subject: below --
2011-12-25 15:06 Mohammed Shafi Shajakhan

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=201112251758.41131.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mohammed@qca.qualcomm.com \
    --cc=pstew@chromium.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.