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
F153760803: D23150.diff
Thu, Apr 23, 12:26 PM
Unknown Object (File)
Sun, Apr 19, 1:45 PM
Unknown Object (File)
Sat, Apr 18, 10:57 PM
Unknown Object (File)
Fri, Apr 17, 11:34 PM
Unknown Object (File)
Fri, Apr 17, 5:24 AM
Unknown Object (File)
Fri, Apr 17, 4:26 AM
Unknown Object (File)
Thu, Apr 9, 5:56 AM
Unknown Object (File)
Mar 18 2026, 10:20 PM

Details

Summary

Sponsored by: Mellanox Technologies

Diff Detail

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

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