All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Shafi <shafi.wireless@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	wireless <linux-wireless@vger.kernel.org>
Subject: Re: Suspicious RCU usage in mac80211
Date: Fri, 4 May 2012 12:10:51 +0530	[thread overview]
Message-ID: <CAD2nsn2kgk9P3zTNP0zVRb-tx3A2p3Nb+FLsTC=TGy9MoXMwtw@mail.gmail.com> (raw)
In-Reply-To: <4FA37461.6050304@lwfinger.net>

Hi Larry,

On Fri, May 4, 2012 at 11:47 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 05/03/2012 01:38 PM, Johannes Berg wrote:
>>
>> diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
>> index 5b7053c..40d3ff4 100644
>> --- a/net/mac80211/agg-tx.c
>> +++ b/net/mac80211/agg-tx.c
>> @@ -421,16 +421,22 @@ static void
>> sta_tx_agg_session_timer_expired(unsigned long data)
>>        struct tid_ampdu_tx *tid_tx;
>>        unsigned long timeout;
>>
>> -       tid_tx = rcu_dereference_protected_tid_tx(sta, *ptid);
>> -       if (!tid_tx)
>> +       rcu_read_lock();
>> +       tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[*ptid]);
>> +       if (!tid_tx) {
>> +               rcu_read_unlock();
>>                return;
>> +       }
>>
>>        timeout = tid_tx->last_tx + TU_TO_JIFFIES(tid_tx->timeout);
>>        if (time_is_after_jiffies(timeout)) {
>>                mod_timer(&tid_tx->session_timer, timeout);
>> +               rcu_read_unlock();
>>                return;
>>        }
>>
>> +       rcu_read_unlock();
>> +
>>  #ifdef CONFIG_MAC80211_HT_DEBUG
>>        printk(KERN_DEBUG "tx session timer expired on tid %d\n",
>> (u16)*ptid);
>>  #endif
>
>
> This patch is the same as was proposed by Mohammed on May 1. I must have
> messed up the testing as I thought it failed; however, it is now working.

honestly i am not sure about the technical details, but Johannes patch
seems to follow almost similar
what's is done in 'sta_addba_resp_timer_expired'. while thought that
is being also with mutex under hold
but the difference is  the lock is unhold before
ieee80211_stop_tx_ba_session is called.

>
> Mohammed - I plan on submitting this to John with a "From:" from you along
> with your s-o-b. Is that OK. It will be submitted for inclusion in 3.5.
>
> Larry
>


-- 
thanks,
shafi

  reply	other threads:[~2012-05-04  6:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10  3:19 Suspicious RCU usage in mac80211 Larry Finger
2012-04-12  3:31 ` Johannes Berg
2012-04-12  3:51   ` Larry Finger
2012-04-12  3:54     ` Johannes Berg
2012-04-12 15:51       ` Larry Finger
2012-04-12 15:55         ` Johannes Berg
2012-05-01 14:25           ` Mohammed Shafi
2012-05-01 19:18             ` Larry Finger
2012-05-02  5:02               ` Mohammed Shafi
2012-05-02 10:00               ` Catalin Marinas
2012-05-02 17:07                 ` Johannes Berg
2012-05-02 20:09                   ` Paul E. McKenney
2012-05-03 18:38                     ` Johannes Berg
2012-05-04  6:17                       ` Larry Finger
2012-05-04  6:40                         ` Mohammed Shafi [this message]
2012-05-04  6:48                           ` Mohammed Shafi
2012-05-04 13:45                             ` Larry Finger
2012-05-04 14:35                               ` Mohammed Shafi
2012-05-03  3:02                   ` Larry Finger
2012-05-03  8:47                     ` Catalin Marinas
2012-05-03 16:54                       ` Larry Finger
2012-05-03 17:12                         ` Paul E. McKenney
2012-05-03 17:46                           ` Larry Finger
2012-05-03 18:22                             ` Paul E. McKenney
2012-05-03 18:32                               ` Larry Finger

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='CAD2nsn2kgk9P3zTNP0zVRb-tx3A2p3Nb+FLsTC=TGy9MoXMwtw@mail.gmail.com' \
    --to=shafi.wireless@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=catalin.marinas@arm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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.