Bjoern A. Zeeb a29c7aeb2e 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.

Reviewed by:	brooks
Approved by:	re (gjb)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7010
2016-06-29 05:21:25 +00:00
..
2016-05-17 12:52:31 +00:00
2016-05-03 18:05:43 +00:00
2016-05-03 18:05:43 +00:00
2016-05-03 18:05:43 +00:00
2016-05-03 18:05:43 +00:00
2015-09-10 05:59:39 +00:00
2016-05-03 18:05:43 +00:00
2015-10-03 09:15:23 +00:00
2015-04-21 10:35:23 +00:00
2016-05-03 18:05:43 +00:00
2016-05-03 18:05:43 +00:00
2015-12-16 09:18:20 +00:00
2016-05-19 16:28:05 +00:00
2016-05-03 18:05:43 +00:00
2016-05-03 18:05:43 +00:00