Page MenuHomeFreeBSD

Fix early if_free panic
ClosedPublic

Authored by bz on Jun 28 2016, 5:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 4, 10:06 PM
Unknown Object (File)
Sat, Oct 4, 10:01 PM
Unknown Object (File)
Sat, Oct 4, 8:43 PM
Unknown Object (File)
Sat, Oct 4, 4:56 PM
Unknown Object (File)
Sat, Oct 4, 2:24 PM
Unknown Object (File)
Thu, Sep 25, 3:06 AM
Unknown Object (File)
Sep 6 2025, 12:34 AM
Unknown Object (File)
Sep 4 2025, 5:03 PM
Subscribers

Details

Summary

Several device drivers call if_alloc() and then do further checks and
will cal if_free() in case of conflict, error, ..
if_free() however sets the VNET instance from the ifp->if_vnet which
was not yet initialized but would only in if_attach(). Fix this by
setting the curvnet from where we allocate the interface in if_alloc().
if_attach() will later overwrite this as needed. We do not set the home_vnet
early on as we only want to prevent the if_free() panic but not change any
of the other housekeeping, e.g., triggered through ifioctl()s.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bz retitled this revision from to Fix early if_free panic.
bz updated this object.
bz edited the test plan for this revision. (Show Details)
bz added reviewers: gnn, rwatson, zec, brooks, glebius.
bz set the repository for this revision to rS FreeBSD src repository - subversion.
bz added a subscriber: network.
brooks edited edge metadata.
This revision is now accepted and ready to land.Jun 28 2016, 5:47 PM
This revision was automatically updated to reflect the committed changes.