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
Unknown Object (File)
Sat, May 24, 11:41 AM
Unknown Object (File)
Wed, May 21, 9:49 AM
Unknown Object (File)
Tue, May 13, 7:24 AM
Unknown Object (File)
Wed, May 7, 7:51 PM
Unknown Object (File)
Apr 14 2025, 10:53 PM
Unknown Object (File)
Apr 11 2025, 9:55 PM
Unknown Object (File)
Mar 13 2025, 11:08 AM
Unknown Object (File)
Mar 5 2025, 1:29 AM
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.