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)
Sun, Apr 28, 10:32 PM
Unknown Object (File)
Sun, Apr 28, 10:20 PM
Unknown Object (File)
Feb 27 2024, 10:26 AM
Unknown Object (File)
Feb 27 2024, 10:13 AM
Unknown Object (File)
Dec 31 2023, 8:45 AM
Unknown Object (File)
Dec 19 2023, 10:30 PM
Unknown Object (File)
Aug 13 2023, 12:48 PM
Unknown Object (File)
Aug 3 2023, 2:41 AM
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.