aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/core.c
Commit message (Collapse)AuthorAgeFilesLines
* cfg80211: check dev_set_name() return valueJohannes Berg2019-05-031-1/+6
| | | | | | | | | | | | | | | | | | commit 59b179b48ce2a6076448a44531242ac2b3f6cef2 upstream. syzbot reported a warning from rfkill_alloc(), and after a while I think that the reason is that it was doing fault injection and the dev_set_name() failed, leaving the name NULL, and we didn't check the return value and got to rfkill_alloc() with a NULL name. Since we really don't want a NULL name, we ought to check the return value. Fixes: fb28ad35906a ("net: struct device - replace bus_id with dev_name(), dev_set_name()") Change-Id: Iecd16d788290c9d51a62c22a7c2784623aa0abc6 Reported-by: syzbot+1ddfb3357e1d7bb5b5d3@syzkaller.appspotmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* BACKPORT: nl80211: Stop scheduled scan if netlink client disappearsJukka Rissanen2017-04-131-0/+16
| | | | | | | | | | | | | (cherry pick from commit 93a1e86ce10e4898f9ca9cd09d659a8a7780ee5e) An attribute NL80211_ATTR_SOCKET_OWNER can be set by the scan initiator. If present, the attribute will cause the scan to be stopped if the client dies. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Bug: 25561044 Change-Id: Ibe4a555b29b64b6df1b9ed4cdcd0f05a69416d14
* BACKPORT: cfg80211: allow userspace to take ownership of interfacesJohannes Berg2017-04-131-0/+44
| | | | | | | | | | | | | | | | | | | (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
* first commitMeizu OpenSource2016-08-151-0/+1165