Hi All,
the ASSERT macro was not being expanded whe CONFIG_IRDA_DEBUG was not set.
This would lead to a kernel oops in irttp_run_tx_queue at the inline
function irlmp_get_lap_tx_queue as the lsap, lap and irlap callbacks
could be null.
This would happen in cases where you start a ping over a connected IR
link and then you move the device (so that the IR link is broken) without
stopping the ping.
Once irttp detects the link being down, the various callbacks get set to
NULL but irlmp_get_lap_tx_queue was unaware of this as the ASSERT calls
were not being expanded. Hence you get a dereferencing a NULL pointer
kernel OOPS.
Rajesh
--------------------------------------------------------------------------
--- kernel/net/irda/irda.h.orig Tue Oct 17 16:43:19 2000
+++ kernel/net/irda.h Tue Oct 17 16:43:45 2000
@@ -71,7 +71,9 @@
##func}
#else
#define IRDA_DEBUG(n, args...)
-#define ASSERT(expr, func)
+#define ASSERT(expr, func) \
+if(!(expr)) { \
+ func}
#endif /* CONFIG_IRDA_DEBUG */
#define WARNING(args...) printk(KERN_WARNING args)
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda