Merge tag 'driver-core-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core revert from Greg KH:
"Here is a single driver core revert for 6.12-rc6. It reverts a change
that came in -rc1 that was supposed to resolve a reported problem, but
caused another one, so revert it for now so that we can get this all
worked out properly in 6.13.

The revert has been in linux-next all week with no reported issues"

* tag 'driver-core-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
Revert "driver core: Fix uevent_show() vs driver detach race"

Changed files
+5 -12
drivers
+5 -8
drivers/base/core.c
··· 26 26 #include <linux/of.h> 27 27 #include <linux/of_device.h> 28 28 #include <linux/pm_runtime.h> 29 - #include <linux/rcupdate.h> 30 29 #include <linux/sched/mm.h> 31 30 #include <linux/sched/signal.h> 32 31 #include <linux/slab.h> ··· 2633 2634 static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env) 2634 2635 { 2635 2636 const struct device *dev = kobj_to_dev(kobj); 2636 - struct device_driver *driver; 2637 2637 int retval = 0; 2638 2638 2639 2639 /* add device node properties if present */ ··· 2661 2663 if (dev->type && dev->type->name) 2662 2664 add_uevent_var(env, "DEVTYPE=%s", dev->type->name); 2663 2665 2664 - /* Synchronize with module_remove_driver() */ 2665 - rcu_read_lock(); 2666 - driver = READ_ONCE(dev->driver); 2667 - if (driver) 2668 - add_uevent_var(env, "DRIVER=%s", driver->name); 2669 - rcu_read_unlock(); 2666 + if (dev->driver) 2667 + add_uevent_var(env, "DRIVER=%s", dev->driver->name); 2670 2668 2671 2669 /* Add common DT information about the device */ 2672 2670 of_device_uevent(dev, env); ··· 2732 2738 if (!env) 2733 2739 return -ENOMEM; 2734 2740 2741 + /* Synchronize with really_probe() */ 2742 + device_lock(dev); 2735 2743 /* let the kset specific function add its keys */ 2736 2744 retval = kset->uevent_ops->uevent(&dev->kobj, env); 2745 + device_unlock(dev); 2737 2746 if (retval) 2738 2747 goto out; 2739 2748
-4
drivers/base/module.c
··· 7 7 #include <linux/errno.h> 8 8 #include <linux/slab.h> 9 9 #include <linux/string.h> 10 - #include <linux/rcupdate.h> 11 10 #include "base.h" 12 11 13 12 static char *make_driver_name(const struct device_driver *drv) ··· 100 101 101 102 if (!drv) 102 103 return; 103 - 104 - /* Synchronize with dev_uevent() */ 105 - synchronize_rcu(); 106 104 107 105 sysfs_remove_link(&drv->p->kobj, "module"); 108 106