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)
Tue, Apr 1, 7:17 AM
Unknown Object (File)
Sun, Mar 30, 8:36 AM
Unknown Object (File)
Fri, Mar 21, 3:06 PM
Unknown Object (File)
Mon, Mar 10, 9:15 PM
Unknown Object (File)
Sat, Mar 8, 11:00 AM
Unknown Object (File)
Mar 6 2025, 4:59 PM
Unknown Object (File)
Feb 27 2025, 2:25 AM
Unknown Object (File)
Feb 21 2025, 12:56 PM

Details

Summary

Sponsored by: Mellanox Technologies

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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