Hi,
I have migrated a system from RTL 2.0 to 2.2 today, and when I try to load
the rtl_time module I get a kernel oops due to a NULL pointer.

This is caused by references to kb_mksound in init_hrtime(), but because 
I use a kernel without support for virtual terminals, kb_mksound is 
defined and exported, but not initialized, so when kb_mksound is
called, things are not going too well.

The quite obvious soulution would be to enable support for virtual
terminals, which is not a big problem in many cases.

The maybe not so obvious solution, which however makes me happy, is to
remove the call to kd_mksound in init_hrtime when VT support is not
persent in the kernel.

I have made a patch that should take care of the problem, and I hope
someone would consider applying it to the RTL2.2 distribution.

Patch follows:

--- rtlinux-2.2.orig/Makefile   Wed Feb 23 23:07:24 2000
+++ rtlinux-2.2/Makefile        Wed Jun 14 17:45:05 2000
@@ -70,6 +70,10 @@
 AFLAGS += -D__SMP__
 endif
 
+ifdef CONFIG_VT
+CFLAGS += -D__CONFIG_VT__
+endif
+
 CFLAGS += -D__RTL__ -D__KERNEL__ -DMODULE
 include schedulers/$(ARCH)/Makefile
 
--- rtlinux-2.2.orig/schedulers/i386/rtl_time.c Wed Feb 23 23:07:24 2000
+++ rtlinux-2.2/schedulers/i386/rtl_time.c      Wed Jun 14 17:47:44 2000
@@ -352,7 +352,9 @@
 {
        int flags;
 
+#ifdef __CONFIG_VT__
        kd_mksound(0, 0); /* clear the possibly pending sound timer */
+#endif
        save_kd_mksound = kd_mksound;
        kd_mksound = rtl_kd_mksound;
 

-- 
�ystein Svendsen

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to