Add EXPORT_SYMBOL for hotplug_path
Subsystems (3)
PATCH 1/1 Add EXPORT_SYMBOL for hotplug_path
If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.
lib/kobject_uevent.c (mode:100644) +2 -0
@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */
@@ -178,6 +179,7 @@ #ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 2 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.
shouldn't this be a _GPL export since it's quite internal to linux...
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.shouldn't this be a
_GPLexport since it's quite internal to linux...
Doesn't matter to me.
lib/kobject_uevent.c (mode:100644) +2 -0
@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */
@@ -178,6 +179,7 @@ #ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL_GPL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 24 lines · Tom Rini
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.shouldn't this be a
_GPLexport since it's quite internal to linux...Doesn't matter to me.
Signed-off-by Tom Rini <[email protected]>Index:
lib/kobject_uevent.c
===================================================================lib/kobject_uevent.c (mode:100644) +1
-0@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */
lib/kobject_uevent.c (mode:100644) line 184
Quoted 6 lines
lib/kobject_uevent.c (mode:100644) +1
-0@@ -178,6 +179,7 @@ #ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL_GPL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);
ACK, I hit this a few days ago too, and did an identical patch for the Fedora kernel. In addition, there was also this one..
WARNING:/usr/src/build/566509-ppc64iseries/install/lib/modules/2.6.11-1.1311_FC4/kernel/drivers/input/input.ko needs unknown symbol add_input_randomness
drivers/char/random.c renamed from drivers/char/random.c~ +1 -0
@@ -646,6 +646,7 @@ extern void add_input_randomness(unsigneadd_timer_randomness (&input_timer_state, (type <<4 ) ^ code ^ (code >>4 ) ^ value); } +EXPORT_SYMBOL_GPL (add_input_randomness);void add_interrupt_randomness (int irq) {
Quoted 4 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.Signed-off-by Tom Rini <[email protected]>
Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.
What caused the input code to be added back into the kernel? I'll try to go track that down...
thanks,
greg k-h
Quoted 4 lines · Greg KH
Quoted 3 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.
Quoted 9 lines
Quoted 1 line
Signed-off-by Tom Rini <[email protected]>Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.
What caused the input code to be added back into the kernel? I'll try to go track that down...
The change never made it into the kernel. And I need to finish proper input_dev sysfs conversion...
Signature · 1 line
Dmitry
Quoted 11 lines · Dmitry Torokhov
Quoted 10 lines · Greg KH
Quoted 4 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.Signed-off-by Tom Rini <[email protected]>Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.
Quoted 6 lines
Quoted 3 lines
What caused the input code to be added back into the kernel? I'll try to go track that down...
The change never made it into the kernel. And I need to finish proper
input_devsysfs conversion...
Ah, ok, thanks. So I'll ACK the EXPORT_SYMBOL_GPL() version of this patch for now.
thanks,
greg k-h
Quoted 18 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.Signed-off-by Tom Rini <[email protected]>Index:
lib/kobject_uevent.c
===================================================================lib/kobject_uevent.c (mode:100644) +1
-0@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */
lib/kobject_uevent.c (mode:100644) line 184
Quoted 6 lines
lib/kobject_uevent.c (mode:100644) +1
-0@@ -178,6 +179,7 @@ #ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);
Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling /sbin/hotplug, which is completely nonsense these days.
Thanks,
Kay
Quoted 20 lines · Kay Sievers
Quoted 19 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.Signed-off-by Tom Rini <[email protected]>Index:
lib/kobject_uevent.c
===================================================================lib/kobject_uevent.c (mode:100644) +1
-0@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */@@ -178,6 +179,7 @@
Quoted 11 lines
lib/kobject_uevent.c (mode:100644) line 184
Quoted 5 lines
lib/kobject_uevent.c (mode:100644) +1
-0#ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling
/sbin/hotplug, which is completely nonsense these days.
So Greg said he's ACK this since the "make it private" stuff isn't done yet. Will this go in or no?
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 33 lines · Tom Rini
Quoted 20 lines · Kay Sievers
Quoted 19 lines · Tom Rini
If
CONFIG_INPUTis set as a module, it will not load ashotplug_pathis not a defined symbol. Trivial fix is toEXPORT_SYMBOLhotplug_path.Signed-off-by Tom Rini <[email protected]>Index:
lib/kobject_uevent.c
===================================================================lib/kobject_uevent.c (mode:100644) +1
-0@@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/kobject_uevent.h> #include <linux/kobject.h> +#include <linux/module.h> #include <net/sock.h> #define BUFFER_SIZE 1024 /* buffer for the hotplug env */@@ -178,6 +179,7 @@Quoted 11 lines
lib/kobject_uevent.c (mode:100644) line 184
Quoted 5 lines
lib/kobject_uevent.c (mode:100644) +1
-0#ifdef CONFIG_HOTPLUG char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; +EXPORT_SYMBOL(hotplug_path); u64 hotplug_seqnum; static DEFINE_SPINLOCK(sequence_lock);Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling
/sbin/hotplug, which is completely nonsense these days.
Quoted 2 lines
So Greg said he's ACK this since the "make it private" stuff isn't done yet. Will this go in or no?
Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the /sbin/hotplug stuff.
Kay
Quoted 6 lines · Kay Sievers
Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the
/sbin/hotplugstuff.
Kay,
I am sorry for being slow with these patches but I really do spend all time that I can on kernel. Unfortunately, there are also other input problems (KVMs causing mice lose sync), and since BK is gone and there is a big backlog of input patches in Vojtech's tree I am unable to get patches easily in mm. I was thinking about creating a git tree or a quilt export but I don't have a place to host them ;(
Signature · 1 line
Dmitry
Quoted 8 lines · Dmitry Torokhov
Quoted 6 lines · Kay Sievers
Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the
/sbin/hotplugstuff.
Quoted 4 lines
Kay,
I am sorry for being slow with these patches but I really do spend all time that I can on kernel.
Oh well, I know that problem. :) We need to move completely away from unmanaged kernel-forked processes in the hotplug area. SUSE 9.3 already ships a udevd that listens only on netlink for hotplug messages and /proc/sys/kernel/hotplug is set to "".
Hannes converted the input layer to a input_device class to get the event through netlink. Maybe you can have a second look at it, so that we can get that thing upstream soon to fix the last broken hotplug-user and make hotplug_path finally private.
Thanks,
Kay
Quoted 14 lines · Kay Sievers
Quoted 8 lines · Dmitry Torokhov
Quoted 6 lines · Kay Sievers
Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the
/sbin/hotplugstuff.Quoted 4 lines
Kay,
I am sorry for being slow with these patches but I really do spend all time that I can on kernel.
Quoted 9 lines
Oh well, I know that problem. :) We need to move completely away from unmanaged kernel-forked processes in the hotplug area. SUSE 9.3 already ships a udevd that listens only on netlink for hotplug messages and
/proc/sys/kernel/hotplugis set to "".
Hannes converted the input layer to ainput_deviceclass to get the event through netlink. Maybe you can have a second look at it, so that we can get that thing upstream soon to fix the last broken hotplug-user and makehotplug_pathfinally private.
Could you send me the tlatest version, please? Lats time I think there were some concerns about lifetime rules...
Signature · 1 line
Dmitry