[PATCH] for 2.4.20rc2 Makefile (fixes Oops)

From: Duncan Haldane (f.duncan.m.haldane@worldnet.att.net)
Date: Sat Nov 16 2002 - 02:55:36 EST


This patch fixes an Oops if the cpia_usb webcam driver is compiled into
the kernel (there since 2.4.13).

usb_register() is called before usb_init(), and the usb_bus_list_lock
semaphore is not initialized... OOPS!

The cpia drivers are in drivers/media/media.o. The fix moves the position
of media.o in the Makefile DRIVERS list to after usb.o. In 2.4.x. this
means that usb-in-the-kernel now gets initialized before cpia-in-the-kernel: No
more OOPS.

Can this simple fix get into 2.4.20?

In this context, thus spoke Alan Cox:
> That media is not right near the end is a quirk of history nothing more.
> It ought to be after usb
and
> media/video can go after almost anything else so I dont see a problem
> with that in 2.4 or 2.5

Hope he's right!

diff -uNr linux-2.4.20-rc2/Makefile linux-2.4.20-rc2-media/Makefile
--- linux-2.4.20-rc2/Makefile Fri Nov 15 21:51:22 2002
+++ linux-2.4.20-rc2-media/Makefile Fri Nov 15 23:12:29 2002
@@ -137,8 +137,7 @@
 DRIVERS-y += drivers/char/char.o \
        drivers/block/block.o \
        drivers/misc/misc.o \
- drivers/net/net.o \
- drivers/media/media.o
+ drivers/net/net.o
 DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
 DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
 DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
@@ -179,6 +178,7 @@
 DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
 DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
 DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
+DRIVERS-y +=drivers/media/media.o
 DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
 DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
 DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o

----------------------------------
E-Mail: Duncan Haldane <f.duncan.m.haldane@worldnet.att.net>
Date: 15-Nov-2002
Time: 21:40:56

This message was sent by XFMail
----------------------------------

--------------End of forwarded message-------------------------

----------------------------------
E-Mail: Duncan Haldane <f.duncan.m.haldane@worldnet.att.net>
Date: 16-Nov-2002
Time: 02:37:42

This message was sent by XFMail
----------------------------------



End of MIME message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:16 EST