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
F116556745: D12038.id32102.diff
Wed, May 7, 7:51 PM
Unknown Object (File)
Mon, Apr 14, 10:53 PM
Unknown Object (File)
Fri, Apr 11, 9:55 PM
Unknown Object (File)
Mar 13 2025, 11:08 AM
Unknown Object (File)
Mar 5 2025, 1:29 AM
Unknown Object (File)
Feb 22 2025, 10:52 PM
Unknown Object (File)
Feb 21 2025, 10:14 PM
Unknown Object (File)
Jan 29 2025, 10:29 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
Lint Not Applicable
Unit
Tests Not Applicable

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.