linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: clear cfg80211_inform_bss() from kmemleak reports
@ 2009-09-03  6:11 Luis R. Rodriguez
  2009-09-03  7:26 ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2009-09-03  6:11 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez

This was giving false positives. We use eventually free this
through kref_put(), things are not so obvious through
cfg80211_bss_update().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 net/wireless/scan.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 19c5a9a..79f7a5d 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -495,6 +495,9 @@ cfg80211_inform_bss(struct wiphy *wiphy,
 
 	kref_init(&res->ref);
 
+	/* cfg80211_bss_update() eats up res - we ensure we free it there */
+	kmemleak_ignore(res);
+
 	res = cfg80211_bss_update(wiphy_to_dev(wiphy), res, 0);
 	if (!res)
 		return NULL;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-09-05  0:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03  6:11 [PATCH] cfg80211: clear cfg80211_inform_bss() from kmemleak reports Luis R. Rodriguez
2009-09-03  7:26 ` Johannes Berg
2009-09-03 18:13   ` Luis R. Rodriguez
2009-09-03 18:17     ` Johannes Berg
2009-09-03 20:43       ` Luis R. Rodriguez
2009-09-04  5:04         ` Johannes Berg
2009-09-04  8:25           ` Catalin Marinas
2009-09-04 21:21             ` Luis R. Rodriguez
2009-09-04 21:41               ` Luis R. Rodriguez
2009-09-04 21:58               ` Luis R. Rodriguez
2009-09-04 22:24                 ` Catalin Marinas
2009-09-04 22:48                   ` Luis R. Rodriguez
2009-09-05  0:03                     ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).