Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 2020 18:30:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        wireless@FreeBSD.org
Subject:   [Bug 249402] Locking issue when requesting an ieee80211 scan
Message-ID:  <bug-249402-21060@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249402

            Bug ID: 249402
           Summary: Locking issue when requesting an ieee80211 scan
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: wireless
          Assignee: wireless@FreeBSD.org
          Reporter: martin@NetBSD.org

Created attachment 218029
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D218029&action=
=3Dedit
Patch to unlock the wifi ic before calling ieee80211_check_scan()

While adapting the ieee80211 stack to NetBSD I ran into a locking issue
whenever scans are started.

I don't know if locking the wifi IC in FreeBSD allows for recursion - in Ne=
tBSD
it doesn't and all scan starts will result in a "locking against myself"
assertion with LOCKDEBUG kernels.

The call here comes in via the ic_newstate callback, which always is called
with IC locked (see also the assertion a few lines above), but the
ieee80211_check_scan() function (and indirectly ieee80211_check_scan_curren=
t()
which calls it) will lock the ic again.

Simple patch to work around attached.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-249402-21060>