xfs
[Top] [All Lists]

xfs_cmountfs bug

To: linux-xfs@xxxxxxxxxxx
Subject: xfs_cmountfs bug
From: Daniel Moore <dxm@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 May 2000 11:27:13 +1000
Sender: owner-linux-xfs@xxxxxxxxxxx
The error return code in xfs_cmountfs checks three vnode_t pointers
to see if the coresponding buftargs in xfs_mount_t should be freed.

ldevvp, rdevvp and ddevvp are initialized to NULL, potentially set
to NULL a couple of times but never _set to non-NULL_ values. Hence
xfs_binval and linvfs_release_inode are never called on the allocated
objects.

Attached is an ugly hack that fixes the problem. I'll leave it up
to someone who knows what's meant to happen to fix it properly.

(to test: modprobe xfs, lsmod, try to mount a non-mounted, non-xfs
FS as an XFS fs, then lsmod again and check the usage counts - they
should increase for each failed mount)

dxm@sherman ~/isms/slinx-xfs> p_rdiff linux/fs/xfs/xfs_vfsops.c
503a504
>         ddevvp=(vnode_t*)1; /* XXX DXM hack */
505a507
>                 ldevvp=(vnode_t*)1; /* XXX DXM hack */
508a511
>                 rdevvp=(vnode_t*)1; /* XXX DXM hack */



-----------------------------------------------------
 Daniel Moore                  dxm@xxxxxxx
 R&D Software Engineer         Phone: +61-3-98348209
 SGI Performance Tools Group   Fax:   +61-3-98132378
-----------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>