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)
Sun, Sep 22, 8:56 AM
Unknown Object (File)
Wed, Sep 18, 10:15 PM
Unknown Object (File)
Wed, Sep 18, 12:50 PM
Unknown Object (File)
Tue, Sep 3, 7:30 AM
Unknown Object (File)
Jul 13 2024, 8:27 AM
Unknown Object (File)
Jun 30 2024, 3:16 AM
Unknown Object (File)
Jun 27 2024, 2:54 PM
Unknown Object (File)
Jun 16 2024, 5:54 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