Page MenuHomeFreeBSD

net80211: fix 'taskqueue_drain with non-sleepable locks held' warning
ClosedPublic

Authored by avos on Feb 25 2016, 7:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 21 2024, 6:06 AM
Unknown Object (File)
Sep 18 2024, 9:19 PM
Unknown Object (File)
Sep 17 2024, 3:18 PM
Unknown Object (File)
Sep 17 2024, 2:14 PM
Unknown Object (File)
Sep 17 2024, 8:15 AM
Unknown Object (File)
Sep 16 2024, 1:08 PM
Unknown Object (File)
Sep 16 2024, 9:19 AM
Unknown Object (File)
Sep 15 2024, 1:55 PM
Subscribers

Details

Summary

Do not run ieee80211_waitfor_parent() when it's not needed.

Test Plan
  1. run Wireshark;
  2. 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

Event Timeline

avos retitled this revision from to net80211: fix 'taskqueue_drain with non-sleepable locks held' warning.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.
adrian edited edge metadata.
This revision is now accepted and ready to land.Feb 28 2016, 7:36 PM
This revision was automatically updated to reflect the committed changes.