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)
Tue, Nov 12, 3:24 PM
Unknown Object (File)
Tue, Nov 12, 3:11 PM
Unknown Object (File)
Oct 16 2024, 7:59 AM
Unknown Object (File)
Oct 5 2024, 10:52 PM
Unknown Object (File)
Oct 4 2024, 8:56 AM
Unknown Object (File)
Oct 4 2024, 5:36 AM
Unknown Object (File)
Oct 1 2024, 11:16 PM
Unknown Object (File)
Oct 1 2024, 7:38 PM
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