From: "Tomas Winkler" <tomasw@gmail.com>
To: "Johannes Berg" <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Helmut Schaa" <hschaa@suse.de>,
"Larry Finger" <Larry.Finger@lwfinger.net>,
linux-wireless@vger.kernel.org,
"Bruno Randolf" <bruno@thinktube.com>
Subject: Re: [PATCHv5] mac80211: fix NULL pointer dereference in ieee80211_compatible_rates
Date: Wed, 21 May 2008 18:11:29 +0300 [thread overview]
Message-ID: <1ba2fa240805210811i41eefa21q8f412e44b4425064@mail.gmail.com> (raw)
In-Reply-To: <1211382489.13667.11.camel@johannes.berg>
On Wed, May 21, 2008 at 6:08 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
>
>> static void ieee80211_rx_bss_put(struct net_device *dev,
>> struct ieee80211_sta_bss *bss)
>> {
>> struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>
>> local_bh_disable();
>> if (!atomic_dec_and_lock(&bss->users, &local->sta_bss_lock)) {
>> local_bh_enable();
>> return;
>> }
>>
>> ---- don't we miss local_bh_enable(); here or spin_unlock_bh takes
>> care of this ---
>>
>>
>> __ieee80211_rx_bss_hash_del(dev, bss);
>> list_del(&bss->list);
>> spin_unlock_bh(&local->sta_bss_lock);
>
> spin_unlock_bh takes care of it. The local_bh_disable() +
> atomic_dec_and_lock() is like spin_lock_bh() + atomic_dec() just with
> different atomicity guarantees.
>
> johannes
>
OK, thanks for explanation
Tomas
prev parent reply other threads:[~2008-05-21 15:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 7:56 [PATCHv5] mac80211: fix NULL pointer dereference in ieee80211_compatible_rates Helmut Schaa
2008-05-20 12:54 ` Tomas Winkler
2008-05-20 12:57 ` Johannes Berg
2008-05-20 13:11 ` Tomas Winkler
2008-05-20 13:22 ` Johannes Berg
2008-05-20 13:33 ` Tomas Winkler
2008-05-20 13:38 ` Johannes Berg
2008-05-20 13:44 ` Tomas Winkler
2008-05-20 13:47 ` Larry Finger
2008-05-20 14:20 ` John W. Linville
2008-05-20 14:41 ` Tomas Winkler
2008-05-21 10:47 ` Tomas Winkler
2008-05-21 13:54 ` John W. Linville
2008-05-21 14:50 ` Tomas Winkler
2008-05-21 15:08 ` Johannes Berg
2008-05-21 15:11 ` Tomas Winkler [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=1ba2fa240805210811i41eefa21q8f412e44b4425064@mail.gmail.com \
--to=tomasw@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=bruno@thinktube.com \
--cc=hschaa@suse.de \
--cc=johannes@sipsolutions.net \
--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