Date: Mon, 23 Aug 1999 22:58:36 -0700 (PDT) From: Brian Feldman <green@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/vm vm_swap.c Message-ID: <199908240558.WAA62735@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
green 1999/08/23 22:58:36 PDT
Modified files:
sys/vm vm_swap.c
Log:
When the SYSINIT() was removed, it was replaced with a make_dev on-demand
creation of /dev/drum via calling swapon. However, the make_dev has a
bogus (insofar that it hasn't been added yet) cdevsw, so later we end
up crashing with a null pointer dereference on the swap vp's specinfo.
The specinfo points to a dev_t with a major of 254 (uninitialized), and
we get a crash on its d_strategy being called.
The simple solution to this is to call cdevsw_add before the make_dev
is ever used. This fixes the panic which occurred upon swapping.
Revision Changes Path
1.83 +2 -1 src/sys/vm/vm_swap.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908240558.WAA62735>
