Patch "cfg80211: fix phy80211 symlink creation" has been added to the 5.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cfg80211: fix phy80211 symlink creation

to the 5.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cfg80211-fix-phy80211-symlink-creation.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 43076c1e074359f11c85d7d1b85ede1bbb8ee6b9 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@xxxxxxxxx>
Date: Tue, 8 Jun 2021 11:32:28 +0200
Subject: cfg80211: fix phy80211 symlink creation

From: Johannes Berg <johannes.berg@xxxxxxxxx>

commit 43076c1e074359f11c85d7d1b85ede1bbb8ee6b9 upstream.

When I moved around the code here, I neglected that we could still
call register_netdev() or similar without the wiphy mutex held,
which then calls cfg80211_register_wdev() - that's also done from
cfg80211_register_netdevice(), but the phy80211 symlink creation
was only there. Now, the symlink isn't needed for a *pure* wdev,
but a netdev not registered via cfg80211_register_wdev() should
still have the symlink, so move the creation to the right place.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics")
Link: https://lore.kernel.org/r/20210608113226.a5dc4c1e488c.Ia42fe663cefe47b0883af78c98f284c5555bbe5d@changeid
Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/wireless/core.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1339,6 +1339,11 @@ void cfg80211_register_wdev(struct cfg80
 	rdev->devlist_generation++;
 	wdev->registered = true;
 
+	if (wdev->netdev &&
+	    sysfs_create_link(&wdev->netdev->dev.kobj, &rdev->wiphy.dev.kobj,
+			      "phy80211"))
+		pr_err("failed to add phy80211 symlink to netdev!\n");
+
 	nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE);
 }
 
@@ -1364,14 +1369,6 @@ int cfg80211_register_netdevice(struct n
 	if (ret)
 		goto out;
 
-	if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
-			      "phy80211")) {
-		pr_err("failed to add phy80211 symlink to netdev!\n");
-		unregister_netdevice(dev);
-		ret = -EINVAL;
-		goto out;
-	}
-
 	cfg80211_register_wdev(rdev, wdev);
 	ret = 0;
 out:


Patches currently in stable-queue which might be from johannes.berg@xxxxxxxxx are

queue-5.12/mac80211-fix-null-ptr-deref-for-injected-rate-info.patch
queue-5.12/cfg80211-avoid-double-free-of-pmsr-request.patch
queue-5.12/cfg80211-shut-down-interfaces-on-failed-resume.patch
queue-5.12/cfg80211-fix-phy80211-symlink-creation.patch
queue-5.12/mac80211-minstrel_ht-fix-sample-time-check.patch
queue-5.12/mac80211-fix-deadlock-in-ap-vlan-handling.patch
queue-5.12/cfg80211-make-certificate-generation-more-robust.patch
queue-5.12/staging-rtl8723bs-fix-monitor-netdev-register-unregi.patch
queue-5.12/mac80211-move-interface-shutdown-out-of-wiphy-lock.patch
queue-5.12/mac80211-fix-reset-debugfs-locking.patch
queue-5.12/mac80211-fix-skb-length-check-in-ieee80211_scan_rx.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux