[Bug 230785] Page fault when if_ath module is unloaded

2020-06-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230785

Adrian Chadd  changed:

   What|Removed |Added

 CC||adr...@freebsd.org

--- Comment #2 from Adrian Chadd  ---
yeah I noticed this again recently. I think I messed up when I did the initial
transition thing with the if_ath modules.

Lemme go see if there's an easy way to fix this or not..

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


[Bug 230785] Page fault when if_ath module is unloaded

2020-06-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230785

--- Comment #1 from Ali Abdallah  ---
I had a closer look into the issue I'm having. The detaching order of the
various if_ath* and ath* modules is broken.

#0  __curthread () at /usr/src/sys/amd64/include/pcpu.h:234
#1  doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:371
#2  0x802f5a4b in db_dump (dummy=, dummy2=, dummy3=, dummy4=) at
/usr/src/sys/ddb/db_command.c:574
#3  0x802f5819 in db_command (last_cmdp=,
cmd_table=, dopager=1) at /usr/src/sys/ddb/db_command.c:481
#4  0x802f5594 in db_command_loop () at
/usr/src/sys/ddb/db_command.c:534
#5  0x802f87ef in db_trap (type=, code=)
at /usr/src/sys/ddb/db_main.c:252
#6  0x80431e2a in kdb_trap (type=3, code=0, tf=0xfe003d985100) at
/usr/src/sys/kern/subr_kdb.c:693
#7  0x806d59dc in trap (frame=0xfe003d985100) at
/usr/src/sys/amd64/amd64/trap.c:621
#8  
#9  kdb_enter (why=0x8079127e "panic", msg=) at
/usr/src/sys/kern/subr_kdb.c:479
#10 0x803e586a in vpanic (fmt=, ap=) at
/usr/src/sys/kern/kern_shutdown.c:866
#11 0x803e56a3 in panic (fmt=0x80865248 
"m\201y\200\377\377\377\377") at /usr/src/sys/kern/kern_shutdown.c:804
#12 0x8067fae7 in vm_fault_hold (map=0xf80002001000,
vaddr=, fault_type=4 '\004', fault_flags=,
m_hold=0x0)
at /usr/src/sys/vm/vm_fault.c:614
#13 0x8067d4b0 in vm_fault (map=0xf80002001000, vaddr=, fault_type=4 '\004', fault_flags=0) at /usr/src/sys/vm/vm_fault.c:562
#14 0x806d5ff4 in trap_pfault (frame=0xfe003d985590, usermode=0) at
/usr/src/sys/amd64/amd64/trap.c:846
#15 0x806d54cf in trap (frame=0xfe003d985590) at
/usr/src/sys/amd64/amd64/trap.c:443
#16 
#17 0x811bf0c0 in ?? ()
#18 0x810b157a in ath_intr (arg=0xfe3e4000) at
/usr/src/sys/dev/ath/if_ath.c:2106
#19 0x803af284 in intr_event_execute_handlers (p=,
ie=) at /usr/src/sys/kern/kern_intr.c:1129
#20 ithread_execute_handlers (p=, ie=) at
/usr/src/sys/kern/kern_intr.c:1142
#21 ithread_loop (arg=) at /usr/src/sys/kern/kern_intr.c:1222
#22 0x803abdc3 in fork_exit (callout=0x803af0b0 ,
arg=0xf800027e94c0, frame=0xfe003d985ac0) at
/usr/src/sys/kern/kern_fork.c:1065
#23 

(kgdb) frame 18
#18 0x810b157a in ath_intr (arg=0xfe3e4000) at
/usr/src/sys/dev/ath/if_ath.c:2106
l
2106if (!ath_hal_intrpend(ah)) {/* shared irq, not for
us */

(kgdb) print ah->ah_isInterruptPending
$1 = (HAL_BOOL (*)(struct ath_hal *)) 0x811bf0c0

# kldstat 
Id Refs AddressSize Name
 1   79 0x8020   e81700 kernel
 4   11 0x810890001c890 ath_hal.ko
 53 0x810a600060c40 ath_main.ko
 63 0x81107000 1c20 ath_dfs.ko
 79 0x81109000aea68 wlan.ko
 83 0x811b8000 6688 ath_rate.ko
 92 0x811bf0008ad98 ath_hal_ar9300.ko
102 0x8124a00052058 ath_hal_ar5416.ko
113 0x8129d00039578 ath_hal_ar5212.ko
122 0x812d700015d38 ath_hal_ar5211.ko
132 0x812ed00010938 ath_hal_ar5210.ko

The 0x811bf0c0 (ar9300_is_interrupt_pending) belongs to the module
(ath_hal_ar9300) that has been just unloaded.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


[Bug 230785] Page fault when if_ath module is unloaded

2019-02-01 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230785

Andriy Voskoboinyk  changed:

   What|Removed |Added

   Keywords||panic

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


[Bug 230785] Page fault when if_ath module is unloaded

2018-08-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230785

Bug ID: 230785
   Summary: Page fault when if_ath module is unloaded
   Product: Base System
   Version: CURRENT
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: wireless
  Assignee: wirel...@freebsd.org
  Reporter: ali...@gmail.com

When compiling if_ath as a module. kldload if_ath followed by kldunload if_ath
causes a page fault. The chip is AR9380.

[ath] unloaded
[ar5210] unloaded
[ar5211] unloaded
[ar5416] unloaded
[ar5212] unloaded
[ar9300] unloaded
Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex ath0 (ath0) r = 0 (0xfe004eea0190) locked @
/usr/src/sys/dev/ath/if_ath.c:1423
stack backtrace:
#0 0x8044a2b3 at witness_debugger+0x73
#1 0x8044b691 at witness_warn+0x461
#2 0x806ce093 at trap_pfault+0x53
#3 0x806cd6aa at trap+0x2ba
#4 0x806a84a5 at calltrap+0x8
#5 0x81d4c745 at ath_pci_detach+0x95
#6 0x80416d27 at device_detach+0x167
#7 0x8041629f at devclass_driver_deleted+0x4f
#8 0x804161ad at devclass_delete_driver+0x8d
#9 0x8041bc9f at driver_module_handler+0x10f
#10 0x803c3c52 at module_unload+0x32
#11 0x803b65cb at linker_file_unload+0x23b
#12 0x803b695c at linker_file_unload+0x5cc
#13 0x803b782d at kern_kldunload+0xcd
#14 0x806ce9c1 at amd64_syscall+0x281
#15 0x806a8d8d at fast_syscall_common+0x101


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x81cb3180
fault code  = supervisor read instruction, page not present
instruction pointer = 0x20:0x81cb3180
stack pointer   = 0x28:0xfe004e249708
frame pointer   = 0x28:0xfe004e249730
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 701 (kldunload)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"