lkml.org 
[lkml]   [2005]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Re: Oops on megaraid.
On Wed, Jan 05, 2005 at 12:47:52PM -0500, Wakko Warner wrote:
> Kernel: 2.6.8.1 vanilla
> Card: Dell PERC DC/2 (megaraid)
>
> The oops happened when I attempted to unload the megaraid module. Before
> doing this, I ran the dellmgr program to reconfigure the raid.
>
> Before the "oops" text, I saw:
> Badness in remove_proc_entry at fs/proc/generic.c:688
> [<c017c3fa>] remove_proc_entry+0x10a/0x150
> [<d88f6e3e>] megaraid_exit+0x2e/0x3e [megaraid]
> [<c012c690>] sys_delete_module+0x150/0x1a0
> [<c0142a00>] do_munmap+0x140/0x190
> [<c010513b>] syscall_call+0x7/0xb

Someone's removing non-empty directory in procfs. Let's see...
Indeed.
#ifdef CONFIG_PROC_FS
remove_proc_entry("megaraid", &proc_root);
#endif

pci_unregister_driver(&megaraid_pci_driver);
so we remove /proc/megaraid and then procees to remove controllers found
by driver. Each of those has a subdirectory in /proc/megaraid...

Fix is trivial:

diff -urN RC10-bk6-base/drivers/scsi/megaraid.c RC10-bk6-current/drivers/scsi/megaraid.c
--- RC10-bk6-base/drivers/scsi/megaraid.c 2004-12-25 01:04:29.000000000 -0500
+++ RC10-bk6-current/drivers/scsi/megaraid.c 2005-01-05 13:03:51.609698587 -0500
@@ -5109,11 +5109,11 @@
*/
unregister_chrdev(major, "megadev");

+ pci_unregister_driver(&megaraid_pci_driver);
+
#ifdef CONFIG_PROC_FS
remove_proc_entry("megaraid", &proc_root);
#endif
-
- pci_unregister_driver(&megaraid_pci_driver);
}

module_init(megaraid_init);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:09    [from the cache]
©2003-2011 Jasper Spaans