Re: kernel BUG at page_alloc.c:98 -- compiling with distcc

From: Marc-Christian Petersen
Date: Wed May 05 2004 - 11:32:40 EST


On Wednesday 05 May 2004 18:25, Carson Gaspar wrote:

Hi Carson,

> I'd love to. However 2.4.27-pre2 broke the tg3 driver. tg3.c contains
> WARN_ON(1). Sadly, WARN_ON doesn't exist in 2.4.x, so depmod correctly
> complains about an unresolved symbol.
> I'm beginning to wonder if anyone actually builds these pre releases... I
> mean, I know the tg3 driver is really obscure, and only used by 2 people,
> but...

by 2 people? you have to be kidding.

Anyway, attached is 2.4 WARN_ON. Apply it and use tg3 :p

ciao, Marc
--- old/include/linux/kernel.h 2004-05-04 21:48:24.000000000 +0200
+++ new/include/linux/kernel.h 2004-05-05 10:53:32.000000000 +0200
@@ -196,4 +196,11 @@ struct sysinfo {

#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)

+#define WARN_ON(condition) do { \
+ if (unlikely((condition)!=0)) { \
+ printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
+ dump_stack(); \
+ } \
+} while (0)
+
#endif /* _LINUX_KERNEL_H */