From: greearb@candelatech.com
To: linux-wireless@vger.kernel.org
Cc: Ben Greear <greearb@candelatech.com>
Subject: [PATCH 5/6] wireless: Fix bss ref count leak in __cfg80211_mlme_assoc
Date: Tue, 18 Jun 2013 15:03:36 -0700 [thread overview]
Message-ID: <1371593017-10985-5-git-send-email-greearb@candelatech.com> (raw)
In-Reply-To: <1371593017-10985-1-git-send-email-greearb@candelatech.com>
From: Ben Greear <greearb@candelatech.com>
The rdev_assoc path holds it's own reference, so the
mlme_assoc must release the reference it took earlier
before returning.
This actually appears to be the leak I have been seeing
in my tests.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
net/wireless/mlme.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index d975510..1c60268 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -432,8 +432,8 @@ out:
if (err) {
if (was_connected)
SET_SME_STATE(wdev, CFG80211_SME_CONNECTED);
- cfg80211_put_bss(&rdev->wiphy, req.bss);
}
+ cfg80211_put_bss(&rdev->wiphy, req.bss);
return err;
}
--
1.7.3.4
next prev parent reply other threads:[~2013-06-18 22:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 22:03 [PATCH 1/6] wireless: Add memory usage debugging greearb
2013-06-18 22:03 ` [PATCH 2/6] mac80211: Fix bss ref leak greearb
2013-06-19 10:49 ` Johannes Berg
2013-06-19 10:51 ` Johannes Berg
2013-06-18 22:03 ` [PATCH 3/6] wireless: Make sure __cfg80211_connect_result always puts bss greearb
2013-06-18 22:03 ` [PATCH 4/6] wireless: Check for dangling wdev->current_bss pointer greearb
2013-06-18 22:03 ` greearb [this message]
2013-06-18 22:03 ` [PATCH 6/6] wireless: Add comments about bss refcounting greearb
2013-06-19 2:51 ` Julian Calaby
2013-06-19 9:49 ` [PATCH 1/6] wireless: Add memory usage debugging Johannes Berg
2013-06-19 14:22 ` Ben Greear
2013-06-19 14:27 ` Johannes Berg
2013-06-22 8:43 ` Kalle Valo
2013-06-22 15:24 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371593017-10985-5-git-send-email-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).