Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 15:11 +0300, Ville Syrjälä wrote: > > > I guess since the outer pointer isn't protected, only the inner ... > > I think just the fact that even the pointers in ieee80211_tx_data > don't have the __rcu annotation makes it rather hard to see what is > really rcu protected and

Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Ville Syrjälä
On Wed, Sep 20, 2017 at 12:39:24PM +0200, Johannes Berg wrote: > On Wed, 2017-09-20 at 13:11 +0300, Ville Syrjala wrote: > > > --- a/net/mac80211/tx.c > > +++ b/net/mac80211/tx.c > > @@ -1770,15 +1770,21 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw > > *hw, > >   struct

Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 13:11 +0300, Ville Syrjala wrote: > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -1770,15 +1770,21 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, >   struct ieee80211_tx_data tx; >   struct sk_buff *skb2; >   > - if

[PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Ville Syrjala
From: Ville Syrjälä I got the following lockdep warning about the rcu_dereference()s in ieee80211_tx_h_select_key(). After tracing all callers of ieee80211_tx_h_select_key() I discovered that ieee80211_get_buffered_bc() and ieee80211_build_data_template() had the