if_ndis panic when setting IP address

From: Lukas Ertl <l.ertl_at_univie.ac.at>
Date: Sun, 21 Dec 2003 17:29:04 +0100 (CET)
Hi,

with the latest ndis commits 802.11 support should be better, nevertheless
I get a panic when setting an IP address with ifconfig.

if_ndis loads fine:

ndis0: <Intel(R) PRO/Wireless LAN 2100 3B Mini PCI Adapter> mem 0xc0200000-0xc0200fff irq 11 at device 2.0 on pci2
ndis0: failed to enable port mapping!
ndis0: failed to enable port mapping!
can't re-use a leaf (ESS_ID)!
no match for NdisUnchainBufferAtBack
no match for NdisGetFirstBufferFromPacketSafe
status: 400100fe
status complete
status: 4001000c
status complete
ndis0: 802.11 address: 00:04:23:7e:d9:98
ndis0: 11b rates: 11Mbps 2Mbps 1Mbps
NDIS dummy called...
last message repeated 50 times
reset done...
NDIS dummy called...
last message repeated 1051 times

The panic happens in ndis_query_buf_safe+0xc, which is unfortunately not
saved in the gdb backtrace, but it looks like a NULL pointer dereference:

GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0x0
fault code		= supervisor write, page not present
instruction pointer	= 0x8:0xc4cb926c
stack pointer	        = 0x10:0xd77bb690
frame pointer	        = 0x10:0xd77bb690
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 22 (irq11: cbb0 fxp0+)
Dumping 511 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 480 496
---
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/acpi/acpi.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/acpi/acpi.ko.debug
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/linux/linux.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/linux/linux.ko.debug
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/ndis/ndis.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/ndis/ndis.ko.debug
Reading symbols from /boot/kernel/if_ndis.ko...done.
Loaded symbols for /boot/kernel/if_ndis.ko
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
240		dumping++;
(kgdb) where
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
#1  0xc044c4c5 in db_fncall (dummy1=0, dummy2=0, dummy3=0,
    dummy4=0xd77bb498 "À¡tÀ\f") at /usr/src/sys/ddb/db_command.c:548
#2  0xc044c212 in db_command (last_cmdp=0xc0749860, cmd_table=0x0,
    aux_cmd_tablep=0xc06ff7e0, aux_cmd_tablep_end=0xc06ff7e4)
    at /usr/src/sys/ddb/db_command.c:346
#3  0xc044c355 in db_command_loop () at /usr/src/sys/ddb/db_command.c:472
#4  0xc044f375 in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_trap.c:73
#5  0xc06966dc in kdb_trap (type=12, code=0, regs=0xd77bb650)
    at /usr/src/sys/i386/i386/db_interface.c:171
#6  0xc06aa606 in trap_fatal (frame=0xd77bb650, eva=0)
    at /usr/src/sys/i386/i386/trap.c:816
#7  0xc06aa2d2 in trap_pfault (frame=0xd77bb650, usermode=0, eva=0)
    at /usr/src/sys/i386/i386/trap.c:735
#8  0xc06a9e2d in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -990359552, tf_esi = 0, tf_ebp = -679758192, tf_isp = -679758212, tf_ebx = -990359552, tf_edx = -1043124778, tf_ecx = -988330848, tf_eax = 0, tf_trapno = 12, tf_err = 2, tf_eip = -993291668, tf_cs = 8, tf_eflags = 66118, tf_esp = -679758048, tf_ss = -992711837})
    at /usr/src/sys/i386/i386/trap.c:420
#9  0xc0698088 in calltrap () at {standard input}:94
#10 0xc4d46b63 in drv_data () from /boot/kernel/if_ndis.ko
#11 0xc4d46284 in drv_data () from /boot/kernel/if_ndis.ko
#12 0xc4d46f0c in drv_data () from /boot/kernel/if_ndis.ko
#13 0xc4d4712f in drv_data () from /boot/kernel/if_ndis.ko
#14 0xc4d31170 in drv_data () from /boot/kernel/if_ndis.ko
#15 0xc4cbb1f8 in ndis_init_dma (arg=0xc4f85000)
    at /usr/src/sys/compat/ndis/kern_ndis.c:669
#16 0xc4ccb6a9 in ndis_start (ifp=0xc4f85000)
    at /usr/src/sys/dev/if_ndis/if_ndis.c:944
#17 0xc4ccb118 in ndis_linksts (adapter=0x0, status=0, sbuf=0x0, slen=0)
    at /usr/src/sys/dev/if_ndis/if_ndis.c:731
#18 0xc4d3a47b in drv_data () from /boot/kernel/if_ndis.ko
#19 0xc4d31b14 in drv_data () from /boot/kernel/if_ndis.ko
#20 0xc4d47cda in drv_data () from /boot/kernel/if_ndis.ko
---Type <return> to continue, or q <return> to quit---
#21 0xc4d44253 in drv_data () from /boot/kernel/if_ndis.ko
#22 0xc4d43997 in drv_data () from /boot/kernel/if_ndis.ko
#23 0xc4d44f12 in drv_data () from /boot/kernel/if_ndis.ko
#24 0xc4d45067 in drv_data () from /boot/kernel/if_ndis.ko
#25 0xc4cbb5f3 in ndis_get_info (arg=0x0, oid=0, buf=0x0, buflen=0xc4f85000)
    at /usr/src/sys/compat/ndis/kern_ndis.c:942
#26 0xc4ccb1a9 in ndis_intr (arg=0xc4f85000)
    at /usr/src/sys/dev/if_ndis/if_ndis.c:768
#27 0xc0526c68 in ithread_loop (arg=0xc1d1a800)
    at /usr/src/sys/kern/kern_intr.c:544
#28 0xc05258e0 in fork_exit (callout=0xc0526a90 <ithread_loop>, arg=0x0,
    frame=0x0) at /usr/src/sys/kern/kern_fork.c:793
(kgdb) quit

regards,
le

-- 
Lukas Ertl                             eMail: l.ertl_at_univie.ac.at
UNIX Systemadministrator               Tel.:  (+43 1) 4277-14073
Vienna University Computer Center      Fax.:  (+43 1) 4277-9140
University of Vienna                   http://mailbox.univie.ac.at/~le/
Received on Sun Dec 21 2003 - 07:29:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC