[2.5] System crash with PCI drivers that handle the same devices

[2.5] System crash with PCI drivers that handle the same devices

Post by Rusty Russel » Sat, 11 Jan 2003 11:20:10




Quote:> Hello Rusty and others,

I'm not sure why I'm in here...

Have you tried doung both these builtin?

Your drivers also have the same name, which is odd, at least.  Also,
you should use SET_MODULE_OWNER or set .owner = THIS_MODULE.

Jeff prefers SET_MODULE_OWNER, but I never figured out why.

Sorry I can't be of more help,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. [2.5] System crash with PCI drivers that handle the same devices

Hello Rusty and others,

I noticed very severe system crashes (hard lockup, no sysreq or
immediate system reset) with some of my pci drivers under 2.5.54.

(Because of this, no real oops or ksymoops output...)

The problem is, that apparently something in the pci subsystem goes
really wrong, when multiple pci driver, which want to handle the same
devices, are registered.

I attach two small sample drivers called "a" and "b" that wants to
attach to every pci device out there. "b" is a copy of "a".

You can load "a" with no problems, you'll see a message for every device
it tries to attach to.

But if you compile the same driver as "b" and insert it -- system
lockup. Sometimes, you can see some messages on the console, but I get a
system reset most of the time.

I assume that one of the list functions in the module subsystem goes
amok, but I wasn't able to track it down unfortunately.

CU
Michael.

  a.c
1K Download

  b.c
1K Download

[ Makefile < 1K ]
ifeq ($(obj),)
obj = .
endif

MDIR            := misc

export-objs     :=

obj-m           := a.o b.o

#################################################
# compile modules

ifneq ($(KERNELRELEASE),)
# recursive call from kernel build system
dummy           := $(shell echo $(KERNELRELEASE) > $(obj)/.version)

multi-m         := $(filter $(list-multi), $(obj-m))
int-m           := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
EXTRA_CFLAGS    := -I ../linux/include -DCONFIG_DVB_AV7110_OSD

else
# take version info from last module build if available
KERNELRELEASE   := $(shell cat $(obj)/.version 2>/dev/null || uname -r)
endif

KDIR            := /lib/modules/$(KERNELRELEASE)/build
PWD             := $(shell pwd)
DEST            := /lib/modules/$(KERNELRELEASE)/$(MDIR)

build::
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

install:: build
        strip --strip-debug $(obj-m)
        -su -c "mkdir -p $(DEST); cp -v $(obj-m) $(DEST); depmod -a"

clean::
        find . -type l -exec rm {} \;
        -rm -f *~ .version
        -rm -f *.o
        -rm -f .*.o.flags
        -rm -f .*.o.cmd

2. Help: NIS passwords don't work

3. pci x86 solaris 2.5 device drivers

4. Monitoring and protecting GPL code

5. trying to open a device driver causes system crash

6. Location of named daemon question

7. Sol 2.5.1 device driver--Ultras and Enterprise system crashes

8. Correct PLIP Cable ?

9. Is PPP crashing x86 Solaris 2.5 system ?

10. PCI SCSI/2 F/W Adapter Device Driver hangs system

11. 2.5 ACPI P-states driver crashes

12. Porting tape device driver to Solaris 2.5

13. Solaris 2.5 x86 driver for more then one PCI card instance.