diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2014-03-24 17:57:27 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:23 +0200 |
| commit | b9ee3975365c18fb009abcd739b1b77078821a03 (patch) | |
| tree | 3f76f3661ee9b6c88ee2080b717a7b4334c3cd62 /include/net | |
| parent | 44aafa3ee4d56138aa5adf8566ab34ce0c0e0d5a (diff) | |
BACKPORT: cfg80211: allow userspace to take ownership of interfaces
(cherry pick from commit 78f22b6a3a9254460d23060530b48ae02a9394e3)
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>
Bug: 25561044
Change-Id: I5a9c8883c5c204ac5d2917ab8492b44daf4b71e7
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7a75104d6..6719f3fe0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2887,6 +2887,7 @@ struct cfg80211_cached_keys; * @p2p_started: true if this is a P2P Device that has been started * @cac_started: true if DFS channel availability check has been started * @cac_start_time: timestamp (jiffies) when the dfs state was entered. + * @owner_nlportid: (private) owner socket port ID */ struct wireless_dev { struct wiphy *wiphy; @@ -2941,6 +2942,8 @@ struct wireless_dev { bool cac_started; unsigned long cac_start_time; + u32 owner_nlportid; + #ifdef CONFIG_CFG80211_WEXT /* wext data */ struct { |
