freebsd-nq/sys/dev/pci
Stefan Eßer 66f314b5f2 The code that was meant to test alignment of the register offset
parameter in the read and write case dereferenced an unitialized
pointer and can't possibly ever have catched an actual invalid
argument.

This was apparently true for the read/write and getconf cases. The
latter does not even receive the paramter that is to be verified.

I'm surprised that this did not cause kernel panics, but it seems
that the uninitialized local variable happens to contain data that
may be used as a pointer to memory that satisfies the test condition.

Make the code work as intended by moving the test inside the switch
case where the pointer has been properly initialized.

Since the read and write case shared just about all code (except
for the single call to PCIB_READ_CONFIG resp. PCIB_WRITE_CONFIG) I
have merged both cases.

Noticed by:	trhodes@FreeBSD.org (Tom Rhodes)
2003-10-11 22:20:34 +00:00
..
eisa_pci.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
fixup_pci.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
ignore_pci.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
isa_pci.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pci_if.m Add a new PCI interface method, assign_interrupt, to determine the 2003-07-01 14:08:33 +00:00
pci_pci.c Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pci_private.h Add pci_resume() to reestablish interrupt routing after 2003-09-17 08:32:44 +00:00
pci_user.c The code that was meant to test alignment of the register offset 2003-10-11 22:20:34 +00:00
pci.c Add pci_resume() to reestablish interrupt routing after 2003-09-17 08:32:44 +00:00
pcib_if.m
pcib_private.h Prefer the uintXX_t to the u_intXX_t names. 2003-08-22 03:11:53 +00:00
pcireg.h Teach the PCI code to parse MSI extended capabilities. Re-arrange the 2003-09-14 19:30:00 +00:00
pcivar.h Teach the PCI code to parse MSI extended capabilities. Re-arrange the 2003-09-14 19:30:00 +00:00