Module Name: src
Committed By: phx
Date: Wed Nov 18 22:06:25 UTC 2015
Modified Files:
src/sys/fs/adosfs: advfsops.c
Log Message:
Patch by hannken@ to fix a bug which has been introduced with 1.71.
The kernel crashed with uvm fault when mounting an ados file system.
To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/fs/adosfs/advfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/adosfs/advfsops.c
diff -u src/sys/fs/adosfs/advfsops.c:1.74 src/sys/fs/adosfs/advfsops.c:1.75
--- src/sys/fs/adosfs/advfsops.c:1.74 Mon Apr 20 13:44:16 2015
+++ src/sys/fs/adosfs/advfsops.c Wed Nov 18 22:06:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: advfsops.c,v 1.74 2015/04/20 13:44:16 riastradh Exp $ */
+/* $NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.74 2015/04/20 13:44:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -369,9 +369,12 @@ adosfs_statvfs(struct mount *mp, struct
int
adosfs_vget(struct mount *mp, ino_t an, struct vnode **vpp)
{
+ u_long block;
int error;
- error = vcache_get(mp, &an, sizeof(an), vpp);
+ block = an;
+ KASSERT(block == an);
+ error = vcache_get(mp, &block, sizeof(block), vpp);
if (error)
return error;
error = vn_lock(*vpp, LK_EXCLUSIVE);
@@ -394,7 +397,7 @@ adosfs_loadvnode(struct mount *mp, struc
struct adosfsmount *amp;
struct anode *ap;
struct buf *bp;
- ino_t an;
+ u_long an;
char *nam, *tmp;
int namlen, error;