Add IFF_NEEDSGIANT to IFF_CANTCHANGE, to prevent user-level code

from clearing the IFF_NEEDSGIANT flag on Giant-locked interfaces.
In particular, wpa_supplicant was doing this on USB interfaces,
causing panics when Giant-locked code was then called without Giant.

Submitted by:	Alexey Popov
Reviewed by:	rwatson
MFC after:	3 days
This commit is contained in:
iedowse 2008-03-27 18:02:30 +00:00
parent 591c29cdac
commit 8b81d719e1

View File

@ -163,7 +163,8 @@ struct if_data {
/* flags set internally only: */
#define IFF_CANTCHANGE \
(IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\
IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC)
IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\
IFF_NEEDSGIANT)
/*
* Values for if_link_state.