Subject: kern/13125: Change to use POOL_DIAGNOSTIC for pool diags breaks kernel link
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@mediaone.net>
List: netbsd-bugs
Date: 06/06/2001 16:18:11
>Number:         13125
>Category:       kern
>Synopsis:       Change to use POOL_DIAGNOSTIC for pool diags breaks kernel link
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 06 13:13:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rafal Boni
>Release:        -current as of June 5th, 8pm EDT.
>Organization:
Not this week
>Environment:
System: NetBSD cyclops 1.5V NetBSD 1.5V (CYCLOPS.gdb) #0: Sun May 20 13:54:43 EDT 2001 rafal@cyclops.waterside.net:/extra/src-current/sys/arch/i386/compile/CYCLOPS.gdb i386
Architecture: i386
Machine: i386
>Description:
	Recently Jason (I think) changed the pool code to only turn on
	certain diagnostics if the POOL_DIAGNOSTIC option was set, instead
	of the previous DIAGNOSTIC.  

	However, pool.h does not include "opt_pool.h" and hence in the 
	POOL_DIAGNOSTIC case, `pool_get', among others, if never defined.
	This worked previously because the DIAGNOSTIC define was passed
	to the compiler on the command line.
>How-To-Repeat:
	Build kernel with `options POOL_DIAGNOSTIC'
>Fix:

Index: pool.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/pool.h,v
retrieving revision 1.26
diff -b -u -r1.26 pool.h
--- pool.h	2001/06/05 18:51:03	1.26
+++ pool.h	2001/06/06 19:50:16
@@ -44,6 +44,10 @@
 #define	__POOL_EXPOSE
 #endif
 
+#if defined(_KERNEL_OPT)
+#include "opt_pool.h"
+#endif
+
 #ifdef __POOL_EXPOSE
 #include <sys/lock.h>
 #include <sys/queue.h>
>Release-Note:
>Audit-Trail:
>Unformatted: