Module Name: src
Committed By: bouyer
Date: Sun Nov 22 14:02:31 UTC 2015
Modified Files:
src/sys/fs/adosfs [netbsd-7]: advfsops.c
Log Message:
Pull up following revision(s) (requested by phx in ticket #1042):
sys/fs/adosfs/advfsops.c: revision 1.75
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.71 -r1.71.2.1 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.71 src/sys/fs/adosfs/advfsops.c:1.71.2.1
--- src/sys/fs/adosfs/advfsops.c:1.71 Tue Aug 5 08:50:54 2014
+++ src/sys/fs/adosfs/advfsops.c Sun Nov 22 14:02:31 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: advfsops.c,v 1.71 2014/08/05 08:50:54 hannken Exp $ */
+/* $NetBSD: advfsops.c,v 1.71.2.1 2015/11/22 14:02:31 bouyer Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.71 2014/08/05 08:50:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.71.2.1 2015/11/22 14:02:31 bouyer 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;