Skip to contentSkip to conversation

Runtime fix for intermodule.c

PATCH In review Adrian Glaubitz 5 participants 6 messages Jul 12, 2005 – Jul 13, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Runtime fix for intermodule.c

Hello Rusty,

As it seeems that you are the maintainer of the module related code in the Linux kernel, I send these two small patches to you:

This little patch adds the missing function declaration of the deprecatated function call inter_module_get to the header file include/linux/module.h and the necessary EXPORT_SYMBOL to kernel/intermodule.c. Without the declaration and the EXPORT_SYMBOL any module that requires the inter_module_get call will fail upon loading since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

Kernel version is 2.6.12.1

Affected modules are for example the ltmodem drivers version 8.31a8 for lucent chipsets, they won't work without the fix.

Regards,

Adrian Glaubitz
([email protected])

intermodule.c renamed from intermodule.c.orig +1 -0
@@ -180,3 +180,4 @@ EXPORT_SYMBOL(inter_module_register);
 EXPORT_SYMBOL(inter_module_unregister);
 EXPORT_SYMBOL(inter_module_get_request);
 EXPORT_SYMBOL(inter_module_put);
+EXPORT_SYMBOL(inter_module_get);
linux/module.h renamed from linux/module.h.orig +1 -0
@@ -566,5 +566,6 @@ extern void __deprecated inter_module_un
 extern const void * __deprecated inter_module_get_request(const char *,
 		const char *);
 extern void __deprecated inter_module_put(const char *);
+extern const void * __deprecated inter_module_get(const char *);
 
 #endif /* _LINUX_MODULE_H */
#1 lore raw
Quoted 8 lines · Adrian Glaubitz

This little patch adds the missing function declaration of the deprecatated function call inter_module_get to the header file include/linux/module.h and the necessary EXPORT_SYMBOL to kernel/intermodule.c. Without the declaration and the EXPORT_SYMBOL any module that requires the inter_module_get call will fail upon loading since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

There's a reason you shouldn't use it, and because of that it's not exported.

#2 lore raw
Quoted 11 lines
Quoted 8 lines

This little patch adds the missing function declaration of the deprecatated function call inter_module_get to the header file include/linux/module.h and the necessary EXPORT_SYMBOL to kernel/intermodule.c. Without the declaration and the EXPORT_SYMBOL any module that requires the inter_module_get call will fail upon loading since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

There's a reason you shouldn't use it, and because of that it's not exported.

I am sorry ! Since I didn't see any reason why not, I added the export to code again to make my modem work with the latest kernel versions. Well, I will need to try to fix the driver then. I think I can use symbol_get instead, can't I ?

Regards,

Adrian Glaubitz

#3 lore raw
In reply to Christoph Hellwig
Quoted 5 lines
Quoted 2 lines

since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

There's a reason you shouldn't use it, and because of that it's not exported.

Oh BTW, while we're at it: With what should I replace inter_module_get? I'm maintaining an "ancient-sufficient" nvidia driver for myself that uses it in one or two places.

Jan Engelhardt

#4 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 5 lines
Quoted 2 lines

since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

There's a reason you shouldn't use it, and because of that it's not exported.

Oh BTW, while we're at it: With what should I replace inter_module_get? I'm maintaining an "ancient-sufficient" nvidia driver for myself that uses it in one or two places.

if it does that to talk to agp you have to remove it since the agp side of things isn't there anymore since several kernel releases.

#5 lore raw
In reply to Adrian Glaubitz
Quoted 9 lines · Adrian Glaubitz

This little patch adds the missing function declaration of the deprecatated function call inter_module_get to the header file include/linux/module.h and the necessary EXPORT_SYMBOL to kernel/intermodule.c. Without the declaration and the EXPORT_SYMBOL any module that requires the inter_module_get call will fail upon loading since the symbol inter_module_get cannot be resolved, applying this patch will make those modules work again.

Quoted 3 lines

Affected modules are for example the ltmodem drivers version 8.31a8 for lucent chipsets, they won't work without the fix.

Just to be sure I read what I read: you are asking for reexport of a function that was officially deprecated 9 months ago on the grounds that said reexport would be useful for a crappy [1] proprietary module?

[1] Semi-randomly freezing serial mouse after loading.