Subject: Crashes in -current kernel
To: Current Users <current-users@NetBSD.ORG>
From: Jukka Marin <jmarin@teeri.jmp.fi>
List: current-users
Date: 01/22/1996 18:36:15
Hello,

I have experienced lots of crashes running a -current kernel (source from
1996) on Amiga 3000.  Thanks to Michael L. Hitch, the program that crashes
the system seems to be MLink (a slip emulator for Amiga).  It seems that
when the user hangs up a modem connection, MLink receives a SIGHUP and
tries to fchmod() to restore the tty settings.  However, at this point
the tty line has already been closed and the vp->v_mount pointer in
kern/vfs_syscalls.c is NULL.  This causes a panic because the kernel is
trying to access memory address 0:

vfs_syscalls.c:1460
        if (vp->v_mount->mnt_flag & MNT_RDONLY)

I don't know the kernel internals, so I can't tell where the actual bug is.
All I understand is that no matter who or when the fchmod() caller is, the
system should not crash :-)

Maybe some vnode guru could take a look at the problem and see if it
could be easily fixed?  Basically, any user can bring the system down
if it's this easy. :-(

Thanks in beforehand,

  -jm

-- 

                     ---> http://www.jmp.fi/~jmarin/ <---