Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175117350
D60400.id188790.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
933 B
Referenced Files
None
Subscribers
None
D60400.id188790.diff
View Options
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -4892,6 +4892,8 @@
{
int error;
+ IWM_LOCK_ASSERT_LOCKED(sc);
+
if (sc->sc_flags & IWM_FLAG_HW_INITED) {
return;
}
@@ -6557,6 +6559,8 @@
device_t dev = sc->sc_dev;
int i;
+ IWM_LOCK_ASSERT_UNLOCKED(sc);
+
if (!sc->sc_attached)
return 0;
sc->sc_attached = 0;
diff --git a/sys/dev/iwm/if_iwmvar.h b/sys/dev/iwm/if_iwmvar.h
--- a/sys/dev/iwm/if_iwmvar.h
+++ b/sys/dev/iwm/if_iwmvar.h
@@ -566,6 +566,8 @@
#define IWM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
#define IWM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
#define IWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
+#define IWM_LOCK_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
+#define IWM_LOCK_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
static inline bool
iwm_fw_has_api(struct iwm_softc *sc, unsigned int api)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 9, 9:27 AM (4 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40344427
Default Alt Text
D60400.id188790.diff (933 B)
Attached To
Mode
D60400: iwm: add lock assertion checks
Attached
Detach File
Event Timeline
Log In to Comment