Subject: kern/30197: kernel panic while initalizing iavc_pci device
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <wgstuken@s012.nagler-company.com>
List: netbsd-bugs
Date: 05/11/2005 11:10:00
>Number:         30197
>Category:       kern
>Synopsis:       kernel panic while initalizing iavc_pci device
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 11 11:10:00 +0000 2005
>Originator:     W. Stukenbrock
>Release:        NetBSD 2.0_2-Release
>Organization:
>Environment:
	
	
System: NetBSD  2.0.2 NetBSD 2.0.2 (NSW-svc-ISDN) #23: Wed May 11 14:54:46 CEST 2005  root@:/usr/src/sys/arch/i386/compile/NSW-svc-ISDN i386
Architecture: i386
Machine: i386
>Description:
	The kernel will overwrite memory and crash at random places if some AVM B1 ISDN cards are present.
	The problem is located in the file "sys/dev/pci/iavc_pci.c".
	The size in the ATTACH declaration wrong. It looks like an error intruduceded when the iavc driver
	has been splitted into an pci part and other devices.
	This bug ist also in current version of NetBSD.
>How-To-Repeat:
	not relevant
>Fix:
	Correct the size in the ATTACH-structure to the correct value. See diff -c output below.

*** iavc_pci.c	Fri Oct  3 18:38:44 2003
--- iavc_pci.c.new	Wed May 11 12:59:04 2005
***************
*** 80,86 ****
  
  int iavc_pci_intr(void *);
  
! CFATTACH_DECL(iavc_pci, sizeof(struct iavc_softc),
      iavc_pci_probe, iavc_pci_attach, NULL, NULL);
  
  static const struct iavc_pci_product {
--- 80,86 ----
  
  int iavc_pci_intr(void *);
  
! CFATTACH_DECL(iavc_pci, sizeof(struct iavc_pci_softc),
      iavc_pci_probe, iavc_pci_attach, NULL, NULL);
  
  static const struct iavc_pci_product {