From: Johannes Berg <johannes.berg@xxxxxxxxx> This function returns a referenced BSS struct (or NULL), annotate with __must_check. It seems that a lot of drivers get this completely wrong and leak all BSS structs as a result. Reported-by: Adam Mikuta <Adam.Mikuta@xxxxxxxxx> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- CC lots of driver maintainers who need to fix this bug. include/net/cfg80211.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/include/net/cfg80211.h 2011-10-27 14:05:17.000000000 +0200 +++ b/include/net/cfg80211.h 2011-10-27 14:42:51.000000000 +0200 @@ -2651,8 +2651,10 @@ void cfg80211_sched_scan_stopped(struct * * This informs cfg80211 that BSS information was found and * the BSS should be updated/added. + * + * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! */ -struct cfg80211_bss* +struct cfg80211_bss * __must_check cfg80211_inform_bss_frame(struct wiphy *wiphy, struct ieee80211_channel *channel, struct ieee80211_mgmt *mgmt, size_t len, @@ -2674,8 +2676,10 @@ cfg80211_inform_bss_frame(struct wiphy * * * This informs cfg80211 that BSS information was found and * the BSS should be updated/added. + * + * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! */ -struct cfg80211_bss* +struct cfg80211_bss * __must_check cfg80211_inform_bss(struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *bssid, -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html