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
F152721028: D4138.id10312.diff
Thu, Apr 16, 5:04 PM
F152703607: D4138.id10144.diff
Thu, Apr 16, 2:46 PM
F152632229: D4138.id10312.diff
Thu, Apr 16, 3:40 AM
Unknown Object (File)
Wed, Apr 15, 10:47 PM
Unknown Object (File)
Wed, Apr 15, 9:08 AM
Unknown Object (File)
Tue, Apr 14, 9:24 AM
Unknown Object (File)
Sat, Apr 11, 8:07 PM
Unknown Object (File)
Wed, Apr 8, 8:19 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.