Hi,

System in question is FreeBSD 5.1-CURRENT, 
sources for -current cvsupped a few days ago.

Problem occurs while mounting ext2fs partition. If VFS_MOUNT()
returns error there is null pointer dereference happening
in vfs_freeopts() which is called by vfs_mount_destroy()

Trace:
vfs_freeopts(0, ...)
vfs_mount_destroy()
vfs_domount()
vfs_nmount
nmount()

offending code:

/* Release all resources related to the mount options. */
static void
vfs_freeopts(struct vfsoptlist *opts)
{
        struct vfsopt *opt;

        /* jr */
        if (!opts) printf("tailq list opts is NULL pointer\n"); 
                                                                
        while (!TAILQ_EMPTY(opts)) {
                opt = TAILQ_FIRST(opts);
                vfs_freeopt(opts, opt);
        }
        free(opts, M_MOUNT);
}

Trivial patch would be adding: 
  if (!opts) return;

but is it correct?

best regards, bm.
ps. ext2fs was dirty.. 
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to