OK,
But I think I would like to just keep the ASSERT as a debug feature, so we
should put in proper code at these places if this is required.
if (!xyz)
return;
-- Dag
On Tue, 17 Oct 2000 17:40:12 -0400 (EDT), you wrote:
> 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
>
>
>
>
----
Dag Brattli, Mail: [EMAIL PROTECTED]
Senior Systems Engineer Web: http://www.fast.no/
Fast Search & Transfer ASA Phone: +47 776 96 688
P.O. Box 1126 Fax: +47 776 96 689
NO-9261 Troms�, NORWAY Cell: +47 924 05 388
Try FAST Search: http://www.alltheweb.com/
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda