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)
Sun, Oct 12, 6:07 AM
Unknown Object (File)
Thu, Oct 2, 10:15 AM
Unknown Object (File)
Thu, Oct 2, 7:16 AM
Unknown Object (File)
Wed, Oct 1, 8:25 AM
Unknown Object (File)
Tue, Sep 30, 3:02 AM
Unknown Object (File)
Mon, Sep 29, 11:17 PM
Unknown Object (File)
Mon, Sep 29, 10:22 PM
Unknown Object (File)
Mon, Sep 29, 1:20 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.