Page MenuHomeFreeBSD

in_getmulti: recursing on if_addr_lock on malloc failure
ClosedPublic

Authored by rlibby on Nov 12 2015, 11:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 20 2024, 1:48 PM
Unknown Object (File)
Sep 11 2024, 2:23 PM
Unknown Object (File)
Sep 8 2024, 10:01 AM
Unknown Object (File)
Sep 7 2024, 7:37 PM
Unknown Object (File)
Sep 7 2024, 11:46 AM
Unknown Object (File)
Sep 2 2024, 5:58 AM
Unknown Object (File)
Sep 1 2024, 7:34 AM
Unknown Object (File)
Aug 31 2024, 6:03 PM
Subscribers

Details

Summary

We recurse on the if_addr_lock on malloc M_NOWAIT failure in in_getmtuli. I believe the fix is just to invert the unlock and if_delmulti_ifma here. It looks like the obvious race is already possible between if_addmulti and the IF_ADDR_WLOCK above, therefore that race must be okay.

Test Plan

Isilon internal. Reproduce assertion with M_NOWAIT failure injection.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1119
Build 1123: arc lint + arc unit

Event Timeline

rlibby retitled this revision from to in_getmulti: recursing on if_addr_lock on malloc failure.
rlibby updated this object.
rlibby edited the test plan for this revision. (Show Details)
rlibby added reviewers: bms, jhb.
jhb edited edge metadata.

Yes, this is fine. This is just dropping a reference count that it acquired earlier in the function on failure.

This revision is now accepted and ready to land.Nov 12 2015, 11:53 PM

Rlibby doesn't have a src bit — do you want to commit this, JHB, or should I? Or should I wait for other reviews?

Go for it. You can mark me as having reviewed it.

This revision was automatically updated to reflect the committed changes.