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, Jan 11, 4:01 PM
Unknown Object (File)
Nov 24 2024, 9:49 AM
Unknown Object (File)
Nov 12 2024, 12:12 PM
Unknown Object (File)
Nov 11 2024, 5:58 PM
Unknown Object (File)
Nov 11 2024, 10:36 AM
Unknown Object (File)
Oct 31 2024, 11:44 AM
Unknown Object (File)
Oct 4 2024, 7:23 PM
Unknown Object (File)
Oct 2 2024, 12:17 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 Not Applicable
Unit
Tests Not Applicable

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.