Fix for badness in remove_proc_entry

Pavel Roskin proski
Tue Mar 16 16:31:48 PST 2004


Hello!

Hostap fails to remove /proc/net/hostap/wlan0, which results in a kernel
warning when it tries to remove /proc/net/hostap on module unload.

Badness in remove_proc_entry at fs/proc/generic.c:664
Call Trace:
 [<c016be5a>] remove_proc_entry+0x10a/0x170
 [<f8a39c1a>] hostap_exit+0x2a/0x6f [hostap]
 [<c012a76f>] sys_delete_module+0x11f/0x170
 [<c013d10e>] unmap_vma_list+0xe/0x20
 [<c013d48a>] do_munmap+0xea/0x120
 [<c013d500>] sys_munmap+0x40/0x70
 [<c0106fcb>] syscall_call+0x7/0xb

The reason is that the driver tries to free /proc/net/hostap/wifi0
instead.  The attached patch fixes this.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- driver/modules/hostap_proc.c
+++ driver/modules/hostap_proc.c
@@ -457,7 +457,7 @@ void hostap_remove_proc(local_info_t *lo
 		remove_proc_entry("debug", local->proc);
 #endif /* PRISM2_NO_PROCFS_DEBUG */
 		if (local->ddev != NULL && hostap_proc != NULL)
-			remove_proc_entry(local->dev->name, hostap_proc);
+			remove_proc_entry(local->ddev->name, hostap_proc);
 	}
 }
 



More information about the Hostap mailing list