public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the tip tree with the wireless tree
@ 2011-05-17  3:14 Stephen Rothwell
  2011-05-17  7:05 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-05-17  3:14 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Lai Jiangshan, Paul E. McKenney,
	David S. Miller, John W. Linville, Johannes Berg

Hi all,

Today's linux-next merge of the tip tree got a conflict in
net/mac80211/agg-tx.c between commit ec034b208dc8 ("mac80211: fix TX
a-MPDU locking") from the wireless tree and commit 0744371aeba7
("net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()") from the tip
tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/mac80211/agg-tx.c
index cd5125f,53defaf..0000000
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@@ -136,22 -136,6 +136,14 @@@ void ieee80211_send_bar(struct ieee8021
  	ieee80211_tx_skb(sdata, skb);
  }
  
 +void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,
 +			     struct tid_ampdu_tx *tid_tx)
 +{
 +	lockdep_assert_held(&sta->ampdu_mlme.mtx);
 +	lockdep_assert_held(&sta->lock);
 +	rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx);
 +}
 +
- static void kfree_tid_tx(struct rcu_head *rcu_head)
- {
- 	struct tid_ampdu_tx *tid_tx =
- 	    container_of(rcu_head, struct tid_ampdu_tx, rcu_head);
- 
- 	kfree(tid_tx);
- }
- 
  int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
  				    enum ieee80211_back_parties initiator,
  				    bool tx)
@@@ -162,19 -146,16 +154,19 @@@
  
  	lockdep_assert_held(&sta->ampdu_mlme.mtx);
  
 -	if (!tid_tx)
 -		return -ENOENT;
 -
  	spin_lock_bh(&sta->lock);
  
 +	tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
 +	if (!tid_tx) {
 +		spin_unlock_bh(&sta->lock);
 +		return -ENOENT;
 +	}
 +
  	if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) {
  		/* not even started yet! */
 -		rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL);
 +		ieee80211_assign_tid_tx(sta, tid, NULL);
  		spin_unlock_bh(&sta->lock);
- 		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
+ 		kfree_rcu(tid_tx, rcu_head);
  		return 0;
  	}
  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the tip tree with the wireless tree
  2011-05-17  3:14 linux-next: manual merge of the tip tree with the wireless tree Stephen Rothwell
@ 2011-05-17  7:05 ` Paul E. McKenney
  2011-05-17  7:21   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2011-05-17  7:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Lai Jiangshan, David S. Miller,
	John W. Linville, Johannes Berg

Hello!

One of these is mine in -tip (0744371aeb).  Please let me know what
I should be doing about it.

							Thanx, Paul

On Tue, May 17, 2011 at 01:14:17PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the tip tree got a conflict in
> net/mac80211/agg-tx.c between commit ec034b208dc8 ("mac80211: fix TX
> a-MPDU locking") from the wireless tree and commit 0744371aeba7
> ("net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()") from the tip
> tree.
> 
> Just context changes.  I fixed it up (see below) and can carry the fix as
> necessary.
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc net/mac80211/agg-tx.c
> index cd5125f,53defaf..0000000
> --- a/net/mac80211/agg-tx.c
> +++ b/net/mac80211/agg-tx.c
> @@@ -136,22 -136,6 +136,14 @@@ void ieee80211_send_bar(struct ieee8021
>   	ieee80211_tx_skb(sdata, skb);
>   }
>   
>  +void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,
>  +			     struct tid_ampdu_tx *tid_tx)
>  +{
>  +	lockdep_assert_held(&sta->ampdu_mlme.mtx);
>  +	lockdep_assert_held(&sta->lock);
>  +	rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx);
>  +}
>  +
> - static void kfree_tid_tx(struct rcu_head *rcu_head)
> - {
> - 	struct tid_ampdu_tx *tid_tx =
> - 	    container_of(rcu_head, struct tid_ampdu_tx, rcu_head);
> - 
> - 	kfree(tid_tx);
> - }
> - 
>   int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
>   				    enum ieee80211_back_parties initiator,
>   				    bool tx)
> @@@ -162,19 -146,16 +154,19 @@@
>   
>   	lockdep_assert_held(&sta->ampdu_mlme.mtx);
>   
>  -	if (!tid_tx)
>  -		return -ENOENT;
>  -
>   	spin_lock_bh(&sta->lock);
>   
>  +	tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
>  +	if (!tid_tx) {
>  +		spin_unlock_bh(&sta->lock);
>  +		return -ENOENT;
>  +	}
>  +
>   	if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) {
>   		/* not even started yet! */
>  -		rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL);
>  +		ieee80211_assign_tid_tx(sta, tid, NULL);
>   		spin_unlock_bh(&sta->lock);
> - 		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
> + 		kfree_rcu(tid_tx, rcu_head);
>   		return 0;
>   	}
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the tip tree with the wireless tree
  2011-05-17  7:05 ` Paul E. McKenney
@ 2011-05-17  7:21   ` Stephen Rothwell
  2011-05-17  8:09     ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-05-17  7:21 UTC (permalink / raw)
  To: paulmck
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Lai Jiangshan, David S. Miller,
	John W. Linville, Johannes Berg

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

Hi Paul,

On Tue, 17 May 2011 00:05:58 -0700 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
>
> One of these is mine in -tip (0744371aeb).  Please let me know what
> I should be doing about it.

In this case, I would say absolutely nothing (assuming I did the
resolution correctly) :-)  If I can figure it out, Linus can as well and
will do so when these trees hit his in a week or so.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the tip tree with the wireless tree
  2011-05-17  7:21   ` Stephen Rothwell
@ 2011-05-17  8:09     ` Ingo Molnar
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2011-05-17  8:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: paulmck, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Lai Jiangshan, David S. Miller,
	John W. Linville, Johannes Berg


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Paul,
> 
> On Tue, 17 May 2011 00:05:58 -0700 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> >
> > One of these is mine in -tip (0744371aeb).  Please let me know what
> > I should be doing about it.
> 
> In this case, I would say absolutely nothing (assuming I did the
> resolution correctly) :-)  If I can figure it out, Linus can as well and
> will do so when these trees hit his in a week or so.

Yeah. The two trees are doing different things, and both commits are within 
their own scopes - so this conflict is a natural (and as it seems, mostly 
contextual) conflict, not a workflow messup.

If such conflicts become too numerous then it would make sense to first push 
rcu_kfree() interface upstream and propagate all the fixlets via the individual 
maintainer trees.

I don't think that's necessary: so far the fallout appears to be limited, but 
Stephen will (or should :-) tell us if a conflicts become too painful for him.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-17  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17  3:14 linux-next: manual merge of the tip tree with the wireless tree Stephen Rothwell
2011-05-17  7:05 ` Paul E. McKenney
2011-05-17  7:21   ` Stephen Rothwell
2011-05-17  8:09     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox