<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

From: Andrea Arcangeli &lt;andrea@suse.de&gt;

Turns out parport can do request_module from its exit function.  We should
drop lock anyway, because too many module exit functions oops or hang
anyway, rendering all module ops useless.



---

 kernel/module.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN kernel/module.c~module_exit-deadlock-fix kernel/module.c
--- 25/kernel/module.c~module_exit-deadlock-fix	2004-02-17 20:30:11.000000000 -0800
+++ 25-akpm/kernel/module.c	2004-02-17 20:30:11.000000000 -0800
@@ -596,7 +596,9 @@ sys_delete_module(const char __user *nam
 		wait_for_zero_refcount(mod);
 
 	/* Final destruction now noone is using it. */
+	up(&amp;module_mutex);
 	mod-&gt;exit();
+	down(&amp;module_mutex);
 	free_module(mod);
 
  out:

_
</pre></body></html>