]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: allow userspace to take ownership of interfaces
authorJohannes Berg <johannes.berg@intel.com>
Mon, 24 Mar 2014 16:57:27 +0000 (17:57 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 9 Apr 2014 08:55:28 +0000 (10:55 +0200)
commit2eae0a1244624fb24fb9fed55660eb4b0772e5a7
tree0770800533747eac02405fc01007cf719e0406f3
parent4d048682cce7608349e9adceedc7f8b35e6feffb
cfg80211: allow userspace to take ownership of interfaces

When dynamically creating interfaces from userspace, e.g. for P2P usage,
such interfaces are usually owned by the process that created them, i.e.
wpa_supplicant. Should wpa_supplicant crash, such interfaces will often
cease operating properly and cause problems on restarting the process.

To avoid this problem, introduce an ownership concept for interfaces. If
an interface is owned by a netlink socket, then it will be destroyed if
the netlink socket is closed for any reason, including if the process it
belongs to crashed. This gives us a race-free way to get rid of any such
interfaces.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/wireless/core.c
net/wireless/core.h
net/wireless/nl80211.c