Page MenuHomeFreeBSD

Code must not unlock a mutex while owning the thread lock.
ClosedPublic

Authored by kib on Jan 13 2020, 10:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 16, 6:37 PM
Unknown Object (File)
Mon, Oct 13, 11:25 AM
Unknown Object (File)
Mon, Sep 22, 1:35 AM
Unknown Object (File)
Sep 16 2025, 5:47 AM
Unknown Object (File)
Sep 14 2025, 5:26 PM
Unknown Object (File)
Sep 11 2025, 6:52 PM
Unknown Object (File)
Aug 26 2025, 9:42 AM
Unknown Object (File)
Aug 26 2025, 9:39 AM

Details

Summary

Sponsored by: Mellanox Technologies

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 28633

Event Timeline

sys/compat/linuxkpi/common/src/linux_rcu.c has same bug. Please also fix there.

Should thread_lock() assert Giant not owned?

Should thread_lock() assert Giant not owned?

I do not think so. It might make sense to make a witness assert that no sleepable mutexes are owned, but really the check for recursion in the thread_lock_flags() catches the problematic cases.

Also change linux RCU code.

This revision is now accepted and ready to land.Jan 13 2020, 10:56 AM