Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/adosfs Patch by hannken@ to fix a bug which has been ...



details:   https://anonhg.NetBSD.org/src/rev/bb9662ea06d4
branches:  trunk
changeset: 341704:bb9662ea06d4
user:      phx <phx%NetBSD.org@localhost>
date:      Wed Nov 18 22:06:25 2015 +0000

description:
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.

diffstat:

 sys/fs/adosfs/advfsops.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 3c0dca01a162 -r bb9662ea06d4 sys/fs/adosfs/advfsops.c
--- a/sys/fs/adosfs/advfsops.c  Wed Nov 18 20:25:02 2015 +0000
+++ b/sys/fs/adosfs/advfsops.c  Wed Nov 18 22:06:25 2015 +0000
@@ -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 @@
 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 @@
        struct adosfsmount *amp;
        struct anode *ap;
        struct buf *bp;
-       ino_t an;
+       u_long an;
        char *nam, *tmp;
        int namlen, error;
 



Home | Main Index | Thread Index | Old Index