Page MenuHomeFreeBSD

libthr pshared: correct a bug in allocation
ClosedPublic

Authored by kib on Feb 1 2023, 8:18 PM.
Tags
None
Referenced Files
F84019794: D38345.diff
Sat, May 18, 5:03 AM
Unknown Object (File)
Mar 22 2024, 9:45 PM
Unknown Object (File)
Mar 21 2024, 1:19 PM
Unknown Object (File)
Mar 8 2024, 8:24 AM
Unknown Object (File)
Jan 9 2024, 2:25 PM
Unknown Object (File)
Jan 5 2024, 8:48 AM
Unknown Object (File)
Jan 5 2024, 7:17 AM
Unknown Object (File)
Jan 4 2024, 6:49 AM
Subscribers

Details

Summary
When __thr_pshared_offpage() is called for allocation, it must not use
the cached offpage for the key.  Instead, the cached offpage must be
unmapped and removed from the cache, if any.

It is legitimate for the user code to unmap the shared lock object without
destroying it, and then mapping something over the freed VA to carry
another shared lock.  In this case the cached offpage must be un-cached.

PR:     269277

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Feb 1 2023, 8:18 PM

Add pshared_destroy() helper (a separate commit).

This revision is now accepted and ready to land.Feb 1 2023, 9:56 PM