Skip to contentSkip to conversation

linux-next: manual merge of the wireless-next tree with the wireless tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Sep 26, 2023 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the wireless-next tree got conflicts in:

net/mac80211/cfg.c

between commit:

31db78a4923e ("wifi: mac80211: fix potential key use-after-free")

from the wireless tree and commit:

4d3acf4311a0 ("wifi: mac80211: remove sta_mtx")

from the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 24 lines
Cheers,
Stephen Rothwell

diff --cc net/mac80211/cfg.c
index 0e3a1753a51c,5bc6b1329465..000000000000
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@@ -565,15 -561,7 +561,11 @@@ static int ieee80211_add_key(struct wip
  		break;
  	}
  
 -	return ieee80211_key_link(key, link, sta);
 +	err = ieee80211_key_link(key, link, sta);
 +	/* KRACK protection, shouldn't happen but just silently accept key */
 +	if (err == -EALREADY)
 +		err = 0;
- 
-  out_unlock:
- 	mutex_unlock(&local->sta_mtx);
- 
 +	return err;
  }
  
  static struct ieee80211_key *
#1 lore raw

Hi all,

Quoted 13 lines · On Tue, 26 Sep 2023 12:02:53 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the wireless-next tree got conflicts in:

net/mac80211/cfg.c

between commit:

31db78a4923e ("wifi: mac80211: fix potential key use-after-free")

from the wireless tree and commit:

4d3acf4311a0 ("wifi: mac80211: remove sta_mtx")

Quoted 8 lines

from the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

That wasn't quite right. The final resolution is below.

Signature · 35 lines
Cheers,
Stephen Rothwell

diff --cc net/mac80211/cfg.c
index 0e3a1753a51c,5bc6b1329465..3e7bb883137c
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@@ -472,8 -470,9 +470,10 @@@ static int ieee80211_add_key(struct wip
  	struct ieee80211_local *local = sdata->local;
  	struct sta_info *sta = NULL;
  	struct ieee80211_key *key;
 +	int err;
  
+ 	lockdep_assert_wiphy(local->hw.wiphy);
+ 
  	if (!ieee80211_sdata_running(sdata))
  		return -ENETDOWN;
  
@@@ -565,15 -561,7 +562,11 @@@
  		break;
  	}
  
 -	return ieee80211_key_link(key, link, sta);
 +	err = ieee80211_key_link(key, link, sta);
 +	/* KRACK protection, shouldn't happen but just silently accept key */
 +	if (err == -EALREADY)
 +		err = 0;
- 
-  out_unlock:
- 	mutex_unlock(&local->sta_mtx);
- 
 +	return err;
  }
  
  static struct ieee80211_key *
#2 lore raw
Quoted 18 lines · Stephen Rothwell

Hi all,

Quoted 15 lines · On Tue, 26 Sep 2023 12:02:53 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the wireless-next tree got conflicts in:

net/mac80211/cfg.c

between commit:

31db78a4923e ("wifi: mac80211: fix potential key use-after-free")

from the wireless tree and commit:

4d3acf4311a0 ("wifi: mac80211: remove sta_mtx")

from the wireless-next tree.

Quoted 8 lines
Quoted 6 lines

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

That wasn't quite right. The final resolution is below.

Thanks Stephen, also for the other one!

I knew about the new ones as well but forgot to give you a heads-up, my bad, I'm sorry.

I'm planning to submit a wireless pull request today or tomorrow, and then merge back into wireless-next once it settles in, so this should hopefully be resolved by the end of the week or so.

Thanks,
johannes