HomeFreeBSD

in_getmulti: Fix recursion on if_addr_lock on malloc failure

Description

in_getmulti: Fix recursion on if_addr_lock on malloc failure

When the M_NOWAIT allocation fails, we recurse the if_addr_lock trying
to clean up. Reorder the cleanup after dropping the if_addr_lock. The
obvious race is already possible between if_addmulti and IF_ADDR_WLOCK
above, so it must be ok.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: jhb
Found with: M_NOWAIT failure injection testing
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4138

Details

Provenance
cemAuthored on
Reviewer
jhb
Differential Revision
D4138: in_getmulti: recursing on if_addr_lock on malloc failure
Parents
rS291039: MFhead @ r291038
Branches
Unknown
Tags
Unknown