In cd9660_mount, initialize imp to VFSTOISOFS(mp) instead of NULL.
Remove redundant assignments to imp. This fixes the page fault panic when the kernel mounts an ISO9660 filesystem, introduced at revision 1.27.
This commit is contained in:
parent
3d17d70f0c
commit
3d52cdeb53
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: cd9660_vfsops.c,v 1.27 2005/09/23 12:10:32 jmmv Exp $ */
|
/* $NetBSD: cd9660_vfsops.c,v 1.28 2005/09/30 08:15:46 dyoung Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1994
|
* Copyright (c) 1994
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.27 2005/09/23 12:10:32 jmmv Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.28 2005/09/30 08:15:46 dyoung Exp $");
|
||||||
|
|
||||||
#if defined(_KERNEL_OPT)
|
#if defined(_KERNEL_OPT)
|
||||||
#include "opt_compat_netbsd.h"
|
#include "opt_compat_netbsd.h"
|
||||||
|
@ -169,10 +169,9 @@ cd9660_mount(mp, path, data, ndp, p)
|
||||||
struct vnode *devvp;
|
struct vnode *devvp;
|
||||||
struct iso_args args;
|
struct iso_args args;
|
||||||
int error;
|
int error;
|
||||||
struct iso_mnt *imp = NULL;
|
struct iso_mnt *imp = VFSTOISOFS(mp);
|
||||||
|
|
||||||
if (mp->mnt_flag & MNT_GETARGS) {
|
if (mp->mnt_flag & MNT_GETARGS) {
|
||||||
imp = VFSTOISOFS(mp);
|
|
||||||
if (imp == NULL)
|
if (imp == NULL)
|
||||||
return EIO;
|
return EIO;
|
||||||
args.fspec = NULL;
|
args.fspec = NULL;
|
||||||
|
@ -248,7 +247,6 @@ cd9660_mount(mp, path, data, ndp, p)
|
||||||
if (devvp != imp->im_devvp)
|
if (devvp != imp->im_devvp)
|
||||||
return (EINVAL); /* needs translation */
|
return (EINVAL); /* needs translation */
|
||||||
}
|
}
|
||||||
imp = VFSTOISOFS(mp);
|
|
||||||
return set_statvfs_info(path, UIO_USERSPACE, args.fspec, UIO_USERSPACE,
|
return set_statvfs_info(path, UIO_USERSPACE, args.fspec, UIO_USERSPACE,
|
||||||
mp, p);
|
mp, p);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue