Do not run ieee80211_waitfor_parent() when it's not needed.
Details
- run Wireshark;
- start capture on a wireless interface with promiscuous mode enabled.
Without this patch (dmesg):
taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex bpf global lock (bpf global lock) r = 0 (0xa0aa84d8) locked @ /usr/src/sys/net/bpf.c:772
stack backtrace:
#0 0xa06fd7c5 at witness_debugger+0x75
#1 0xa06fe9a8 at witness_warn+0x338
#2 0xa06f0e86 at taskqueue_drain+0x36
#3 0xb089cdaa at ieee80211_draintask+0x2a
#4 0xb089ccd5 at ieee80211_waitfor_parent+0x35
#5 0xb0870c3a at ieee80211_ioctl+0x26a
#6 0xa077870c at if_setflag+0xdc
#7 0xa07785e3 at ifpromisc+0x33
#8 0xa076e8b9 at bpf_detachd_locked+0x229
#9 0xa0771393 at bpf_dtor+0xb3
#10 0xa061fa11 at devfs_destroy_cdevpriv+0x91
#11 0xa0623270 at devfs_close_f+0x70
#12 0xa0654d71 at _fdrop+0x21
#13 0xa0657fa3 at closef+0x203
#14 0xa06553bc at closefp+0xac
#15 0xa0655d20 at kern_close+0x120
#16 0xa0655bfa at sys_close+0x1a
#17 0xa0899378 at syscall+0x388
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped