Date: Mon, 25 Aug 2003 15:41:14 -0500 From: Aniruddha Bohra <bohra@cs.rutgers.edu> To: freebsd-stable@freebsd.org Subject: scsi-da does not work with invariants Message-ID: <3F4A746A.5000104@cs.rutgers.edu>
next in thread | raw e-mail | index | archive | help
Hello I tried compiling the 4-STABLE branch with INVARIANTS and INVARIANT_SUPPORT. I got a panic on boot - The problem is that daregister calls malloc with M_WAITOK in interrupt context and INVARIANTS panics the kernel. $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.40 2003/08/24 03:26:38 ken Exp $ The problem is in the following lines : softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr); SYSCTL_ADD_NODE is a macro defined in sys/sysctl.h as : #define SYSCTL_ADD_NODE(ctx, parent,nbr,name,access,handler, descr)\ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|access,\ 0, 0, handler, "N", descr); And sysctl_add_oid is defined in kern/kern_sysctl.c and has the following : oidp = malloc(sizeof(struct sysctl_oid), M_SYSCTLOID, M_WAITOK); which has a WAITOK malloc. Unfortunately, I cannot get a trace till tomorrow. Right now the machine runs fine without INVARIANTS and INVARIANT_SUPPORT. Thanks Aniruddha
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F4A746A.5000104>