Page MenuHomeFreeBSD

Don't leak lock from os_kmem_alloc().
ClosedPublic

Authored by jhb on Aug 15 2017, 11:33 PM.
Tags
None
Referenced Files
F81582364: D12038.id32171.diff
Thu, Apr 18, 11:40 AM
Unknown Object (File)
Tue, Apr 16, 8:01 AM
Unknown Object (File)
Thu, Mar 21, 5:16 AM
Unknown Object (File)
Feb 28 2024, 1:00 AM
Unknown Object (File)
Feb 21 2024, 6:03 AM
Unknown Object (File)
Jan 15 2024, 9:21 PM
Unknown Object (File)
Jan 7 2024, 5:08 PM
Unknown Object (File)
Dec 22 2023, 10:20 PM
Subscribers

Details

Summary

The current port patches for os_kmem_alloc() add VM object locking.
However, the lock is not unlocked in the success case because the
unlock code is inside of an if body instead of after the if statement.

Test Plan
  • jpaetzel@ confirmed this fixed a panic he was seeing on head. The panic was a WITNESS warning about the lock still being held when an ithread suspended.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 11096
Build 11480: arc lint + arc unit

Event Timeline

The path for the file to be patched is wrong, the original is correct in this case. The code change does fix the kernel panic when the module is loaded.

This revision is now accepted and ready to land.Aug 17 2017, 4:48 PM
This revision was automatically updated to reflect the committed changes.