lkml.org 
[lkml]   [2002]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: oops in devfs
Jason Thomas writes:
> Okay same thing.
>
> On Thu, Jan 03, 2002 at 12:24:23AM -0700, Richard Gooch wrote:
> > Grab devfs-patch-v199.6 from your local kernel.org mirror site and try
> > again. If you still have the same problem, send the new ksymoops
> > output as well as *complete* kernel boot logs.
>
> they are attached.
[...]
> LVM version 1.0.1-rc4(ish)(03/10/2001)

Ah! You're using LVM! There are known bugs in LVM which cause memory
corruptions. I told Heinz about this on 16-DEC, but it appears the CVS
tree hasn't been updated yet. So grab the latest CVS tree (which fixes
some bugs) and then apply the appended patch (which fixes more
bugs). You definately need both. The patch should be applied in the
drivers/md directory.

I'm afraid that you will need to manually apply this patch, because
the LVM CVS tree has a pile of #ifdef CONFIG_DEVFS_FS's in it, whereas
the LVM code in the kernel tree (which is what I generated the patch
against) has these #ifdef's stripped.

I've offered to Marcelo to take the current LVM CVS, apply my fixes
and send him a patch. That would avoid this problem coming up again
(and again). I haven't had a response yet. Perhaps he's still
recovering from his holiday. I hope so, because that probably means he
enjoyed himself :-)

Marcelo: will you accept such a patch?

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

--- lvm-fs.c~ Sun Nov 11 11:09:32 2001
+++ lvm-fs.c Sun Dec 16 17:37:32 2001
@@ -30,6 +30,7 @@
* 04/10/2001 - corrected devfs_register() call in lvm_init_fs()
* 11/04/2001 - don't devfs_register("lvm") as user-space always does it
* 10/05/2001 - show more of PV name in /proc/lvm/global
+ * 16/12/2001 - fix devfs unregister order and prevent duplicate unreg (REG)
*
*/

@@ -138,7 +139,7 @@
int i;

devfs_unregister(ch_devfs_handle[vg_ptr->vg_number]);
- devfs_unregister(vg_devfs_handle[vg_ptr->vg_number]);
+ ch_devfs_handle[vg_ptr->vg_number] = NULL;

/* remove lv's */
for(i = 0; i < vg_ptr->lv_max; i++)
@@ -148,6 +149,10 @@
for(i = 0; i < vg_ptr->pv_max; i++)
if(vg_ptr->pv[i]) lvm_fs_remove_pv(vg_ptr, vg_ptr->pv[i]);

+ /* must not remove directory before leaf nodes */
+ devfs_unregister(vg_devfs_handle[vg_ptr->vg_number]);
+ vg_devfs_handle[vg_ptr->vg_number] = NULL;
+
if(vg_ptr->vg_dir_pde) {
remove_proc_entry(LVM_LV_SUBDIR, vg_ptr->vg_dir_pde);
vg_ptr->lv_subdir_pde = NULL;
@@ -189,6 +194,7 @@

void lvm_fs_remove_lv(vg_t *vg_ptr, lv_t *lv) {
devfs_unregister(lv_devfs_handle[MINOR(lv->lv_dev)]);
+ lv_devfs_handle[MINOR(lv->lv_dev)] = NULL;

if(vg_ptr->lv_subdir_pde) {
const char *name = _basename(lv->lv_name);
-
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 13:15    [W:0.066 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site