Date: Mon, 17 Mar 1997 05:43:34 +1100 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@freefall.freebsd.org, roberto@keltia.freenix.fr Subject: Re: bin/3004: "watch" causes a reboot when not given a tty name Message-ID: <199703161843.FAA11407@godzilla.zeta.org.au>
index | next in thread | raw e-mail
> > "watch" can cause the system to reboot without any trace > It has been fixed in the current sources. 2.2 also have the fix (Jörg put > it in the 2.2 branch). The problem was that watch tried to enable snoop > mode on /dev/tty. The real problem is in the kernel. Applications should not be able to cause a panic. The problem in watch was actually that it tried to enable snoop mode on the directory /dev/. st_rdev is invalid for non-devices on ufs file systems. For directories and regular files, it is an alias for the first block number in the file. This block number happens to be 0xa40 for my /dev/, so watch eventually tried to enable snoop mode on the cdev with major number 0xa (rwt). I don't have a rwt device, so the cdevsw for it is NULL. The kernel paniced because devtotty() doesn't check for NULL pointers. Brucehelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703161843.FAA11407>
