Removal of request_module in cpia.c since it causes deadlock with new module-init-tools
PATCH 1/1 Removal of request_module in cpia.c since it causes deadlock with new module-init-tools
Hi,
newer versions of module-init-tools do some locking now which leads to a dead-lock if cpia.c does a request_module("cpia_usb/pp"). The attached patch against 2.6.8 removes the request_module. The problem is actually the same as is documented in debian bug #259056 which was caused by alsa autoloading some oss-modules. So I guess there might be more places in the kernel where this new locking in the module-init-tools might lead to dead-locks.
---/usr/src/kernel-source-2.6.8/drivers/media/video/cpia.c.orig 2004-08-14
07:37:26.000000000 +0200
+++ /usr/src/kernel-source-2.6.8/drivers/media/video/cpia.c 2004-10-17
13:31:42.000000000 +0200
@@ -4044,22 +4044,13 @@ static int __init cpia_init(void)
proc_cpia_create();
#endif
-#ifdef CONFIG_KMOD
-#ifdef CONFIG_VIDEO_CPIA_PP_MODULE
- request_module("cpia_pp");
-#endif
-
-#ifdef CONFIG_VIDEO_CPIA_USB_MODULE
- request_module("cpia_usb");
-#endif
-#endif /* CONFIG_KMOD */
-
#ifdef CONFIG_VIDEO_CPIA_PP
cpia_pp_init();
#endif
#ifdef CONFIG_VIDEO_CPIA_USB
cpia_usb_init();
#endif
+
return 0;
}
Signature · 4 lines
Ich verweigere persönliches Wirtschaftswachstum -- Maria Ziegelböck ------------------------------- Email: [email protected]
usr/src/kernel-source-2.6.8/drivers/media/video/cpia.c renamed from usr/src/kernel-source-2.6.8/drivers/media/video/cpia.c.orig +1 -10
@@ -4044,22 +4044,13 @@ static int __init cpia_init(void)proc_cpia_create ();#endif -#ifdef CONFIG_KMOD -#ifdef CONFIG_VIDEO_CPIA_PP_MODULE -request_module ("cpia_pp" ); -#endif - -#ifdef CONFIG_VIDEO_CPIA_USB_MODULE -request_module ("cpia_usb" ); -#endif -#endif /* CONFIG_KMOD */ -#ifdef CONFIG_VIDEO_CPIA_PP cpia_pp_init ();#endif #ifdef CONFIG_VIDEO_CPIA_USB cpia_usb_init ();#endif +return 0 ; }