Page MenuHomeFreeBSD

libthr pshared: correct a bug in allocation
ClosedPublic

Authored by kib on Feb 1 2023, 8:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 24, 9:55 AM
Unknown Object (File)
Mar 11 2025, 10:08 AM
Unknown Object (File)
Mar 11 2025, 12:25 AM
Unknown Object (File)
Mar 9 2025, 5:30 AM
Unknown Object (File)
Feb 24 2025, 1:26 PM
Unknown Object (File)
Feb 20 2025, 1:29 PM
Unknown Object (File)
Feb 18 2025, 3:34 AM
Unknown Object (File)
Feb 18 2025, 3:06 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 Not Applicable
Unit
Tests Not Applicable

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