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)
Thu, Oct 30, 6:19 PM
Unknown Object (File)
Thu, Oct 30, 2:56 AM
Unknown Object (File)
Wed, Oct 29, 3:33 AM
Unknown Object (File)
Tue, Oct 28, 2:22 AM
Unknown Object (File)
Tue, Oct 28, 2:22 AM
Unknown Object (File)
Tue, Oct 28, 2:22 AM
Unknown Object (File)
Mon, Oct 27, 8:33 PM
Unknown Object (File)
Sun, Oct 26, 12:25 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 Not Applicable
Unit
Tests Not Applicable

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.