Kernel Panic after unloading a kext
Kernel Panic after unloading a kext
- Subject: Kernel Panic after unloading a kext
- From: Prokash Sinha <email@hidden>
- Date: Fri, 14 Apr 2017 14:00:35 -0700
i’ve a TCP and UDP filter both registering for IPv4 and IPv6. It’s that when try to unload
I get to this situation. I looked at the protocol type of the socket it is 0, meaning unspecified !.
Not sure what may cause such a thing.
//Frame 1
39
440 while (filter) {
441 struct socket_filter *filter_next;
442 /*
443 * Warning: sflt_attach_private_locked
444 * will drop the lock
445 */
-> 446 sflt_attach_locked(so, filter, 0);
447
448 filter_next = TAILQ_NEXT(filter, sf_protosw_next);
449 if (filter_next)
450 sflt_retain_locked(filter_next);
451
452 /*
453 * Warning: filt_release_locked may remove
454 * the filter from the queue
455 */
456 sflt_release_locked(filter);
457 filter = filter_next;
458 }
459 }
//Frame 2
765 /* Attach socket filters for this protocol */
-> 766 sflt_initsock(so);
* thread #3: tid = 0x0244, 0xffffff7f916e0fc0, name = '0xffffff801aa19dc8', queue = '0x0', stop reason = EXC_BAD_ACCESS (code=1, address=0x916e0fc0)
frame #0: 0xffffff7f916e0fc0
* frame #1: 0xffffff800f9f3fad kernel`sflt_initsock(so=<unavailable>) + 125 at kpi_socketfilter.c:446 [opt]
frame #2: 0xffffff800f9c9c84 kernel`socreate_internal(dom=<unavailable>, aso=<unavailable>, type=<unavailable>, proto=0, p=0xffffff801abdfe90, flags=0, ep=<unavailable>) + 708 at uipc_socket.c:766 [opt]
frame #3: 0xffffff800f9db071 kernel`socket_common [inlined] socreate(dom=<unavailable>, aso=<unavailable>, type=<unavailable>, proto=<unavailable>) + 37 at uipc_socket.c:827 [opt]
frame #4: 0xffffff800f9db04c kernel`socket_common(p=<unavailable>, domain=30, type=2, protocol=0, epid=105, retval=0xffffff801abb2040, delegate=<unavailable>) + 332 at uipc_syscalls.c:264 [opt]
frame #5: 0xffffff800f9daee3 kernel`socket(p=<unavailable>, uap=<unavailable>, retval=<unavailable>) + 67 at uipc_syscalls.c:214 [opt]
frame #6: 0xffffff800fa27066 kernel`unix_syscall(state=<unavailable>) + 550 at systemcalls.c:192 [opt]
frame #7: 0xffffff800f4a3c38 kernel`hndl_unix_scall + 216
General Purpose Registers:
rbx = 0x0000000000000000 <——
rbp = 0xffffff90a82f3e40
rsp = 0xffffff90a82f3e20
r12 = 0xffffff80237b0cf8
r13 = 0x0000000000000000
r14 = 0xffffff8024184868
r15 = 0xffffff8024184840
rip = 0xffffff800f9f3fad kernel`sflt_initsock + 125 at kpi_socketfilter.c:448
kernel`sflt_initsock:
0xffffff800f9f3f30 <+0>: pushq %rbp
0xffffff800f9f3f31 <+1>: movq %rsp, %rbp
0xffffff800f9f3f34 <+4>: pushq %r15
0xffffff800f9f3f36 <+6>: pushq %r14
0xffffff800f9f3f38 <+8>: pushq %r12
0xffffff800f9f3f3a <+10>: pushq %rbx
0xffffff800f9f3f3b <+11>: movq %rdi, %r15
0xffffff800f9f3f3e <+14>: movq 0x18(%r15), %rax
0xffffff800f9f3f42 <+18>: movq 0x18(%rax), %rbx
0xffffff800f9f3f46 <+22>: movq 0x31534b(%rip), %rdi
0xffffff800f9f3f4d <+29>: callq 0xffffff800f49f8c0 ; lck_rw_lock_shared
0xffffff800f9f3f52 <+34>: cmpq $0x0, 0x80(%rbx)
0xffffff800f9f3f5a <+42>: je 0xffffff800f9f400d ; <+221> at kpi_socketfilter.c:460
0xffffff800f9f3f60 <+48>: movq 0x315331(%rip), %rdi
0xffffff800f9f3f67 <+55>: callq 0xffffff800f49fae0 ; lck_rw_lock_shared_to_exclusive
0xffffff800f9f3f6c <+60>: testl êx, êx
0xffffff800f9f3f6e <+62>: jne 0xffffff800f9f3f7c ; <+76> at kpi_socketfilter.c:436
0xffffff800f9f3f70 <+64>: movq 0x315321(%rip), %rdi
0xffffff800f9f3f77 <+71>: callq 0xffffff800f49f9f0 ; lck_rw_lock_exclusive
0xffffff800f9f3f7c <+76>: movq 0x80(%rbx), %rbx
0xffffff800f9f3f83 <+83>: incl 0xf0(%rbx)
0xffffff800f9f3f89 <+89>: testq %rbx, %rbx
0xffffff800f9f3f8c <+92>: je 0xffffff800f9f400d ; <+221> at kpi_socketfilter.c:460
0xffffff800f9f3f92 <+98>: leaq 0x18dc43(%rip), %r14 ; ""lck_rw_unlock_exclusive(): lock held in mode: %d\n"@/Library/Caches/com.apple.xbs/Sources/xnu/xnu-3789.41.3/osfmk/i386/locks_i386.c:1236"
0xffffff800f9f3f99 <+105>: nopl (%rax)
0xffffff800f9f3fa0 <+112>: xorl íx, íx
0xffffff800f9f3fa2 <+114>: movq %r15, %rdi
0xffffff800f9f3fa5 <+117>: movq %rbx, %rsi
0xffffff800f9f3fa8 <+120>: callq 0xffffff800f9f3a10 ; sflt_attach_locked at kpi_socketfilter.c:296
-> 0xffffff800f9f3fad <+125>: movq (%rbx), %r12
0xffffff800f9f3fb0 <+128>: testq %r12, %r12
0xffffff800f9f3fb3 <+131>: je 0xffffff800f9f3f
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden