* [PATCH] cfg80211: fix disassoc while not associated
@ 2009-07-27 8:22 Johannes Berg
2009-07-28 19:53 ` Maxim Levitsky
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-07-27 8:22 UTC (permalink / raw)
To: John Linville; +Cc: Maxim Levitsky, linux-wireless
When trying to disassociate while not associated,
the kernel would crash rather than refusing the
operation, fix this;
Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/mlme.c | 6 ++++++
1 file changed, 6 insertions(+)
--- wireless-testing.orig/net/wireless/mlme.c 2009-07-27 10:20:17.000000000 +0200
+++ wireless-testing/net/wireless/mlme.c 2009-07-27 10:20:56.000000000 +0200
@@ -545,6 +545,12 @@ static int __cfg80211_mlme_disassoc(stru
ASSERT_WDEV_LOCK(wdev);
+ if (wdev->sme_state != CFG80211_SME_CONNECTED)
+ return -ENOTCONN;
+
+ if (WARN_ON(!wdev->current_bss))
+ return -ENOTCONN;
+
memset(&req, 0, sizeof(req));
req.reason_code = reason;
req.ie = ie;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cfg80211: fix disassoc while not associated
2009-07-27 8:22 [PATCH] cfg80211: fix disassoc while not associated Johannes Berg
@ 2009-07-28 19:53 ` Maxim Levitsky
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Levitsky @ 2009-07-28 19:53 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Mon, 2009-07-27 at 10:22 +0200, Johannes Berg wrote:
> When trying to disassociate while not associated,
> the kernel would crash rather than refusing the
> operation, fix this;
>
> Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> net/wireless/mlme.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> --- wireless-testing.orig/net/wireless/mlme.c 2009-07-27 10:20:17.000000000 +0200
> +++ wireless-testing/net/wireless/mlme.c 2009-07-27 10:20:56.000000000 +0200
> @@ -545,6 +545,12 @@ static int __cfg80211_mlme_disassoc(stru
>
> ASSERT_WDEV_LOCK(wdev);
>
> + if (wdev->sme_state != CFG80211_SME_CONNECTED)
> + return -ENOTCONN;
> +
> + if (WARN_ON(!wdev->current_bss))
> + return -ENOTCONN;
> +
> memset(&req, 0, sizeof(req));
> req.reason_code = reason;
> req.ie = ie;
>
>
Thanks, this fixes this bug for me.
Still many problems though.
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-28 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-27 8:22 [PATCH] cfg80211: fix disassoc while not associated Johannes Berg
2009-07-28 19:53 ` Maxim Levitsky
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).