From patchwork Mon Jan 19 14:53:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5659101 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC2819F333 for ; Mon, 19 Jan 2015 14:53:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6497F202F8 for ; Mon, 19 Jan 2015 14:53:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0599920254 for ; Mon, 19 Jan 2015 14:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752202AbbASOxN (ORCPT ); Mon, 19 Jan 2015 09:53:13 -0500 Received: from mga01.intel.com ([192.55.52.88]:1744 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbbASOxM (ORCPT ); Mon, 19 Jan 2015 09:53:12 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 19 Jan 2015 06:53:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,427,1418112000"; d="scan'208";a="664080492" Received: from egrumbacbox.jer.intel.com ([10.12.124.158]) by fmsmga002.fm.intel.com with ESMTP; 19 Jan 2015 06:53:10 -0800 From: Emmanuel Grumbach To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH] mac80211: delete the assoc/auth timer upon suspend Date: Mon, 19 Jan 2015 16:53:06 +0200 Message-Id: <1421679186-10898-1-git-send-email-emmanuel.grumbach@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While suspending, we destroy the authentication / association that might be taking place. While doing so, we forgot to delete the timer which can be firing after local->suspended is already set, producing the warning below. Fix that by deleting the timer. [66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]() [66722.825487] queueing ieee80211 work while going to suspend [66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G W O 3.16.1+ #24 [66722.825537] Workqueue: events_unbound async_run_entry_fn [66722.825545] Call Trace: [66722.825552] [] dump_stack+0x4d/0x66 [66722.825556] [] warn_slowpath_common+0x7d/0xa0 [66722.825572] [] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211] [66722.825573] [] warn_slowpath_fmt+0x4c/0x50 [66722.825586] [] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211] [66722.825598] [] ieee80211_queue_work+0x25/0x50 [mac80211] [66722.825611] [] ieee80211_sta_timer+0x1c/0x20 [mac80211] [66722.825614] [] call_timer_fn+0x8a/0x300 Signed-off-by: Emmanuel Grumbach --- net/mac80211/mlme.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1d6bf01..cd86dd4 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2458,6 +2458,12 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata, sdata_assert_lock(sdata); if (!assoc) { + /* + * we are not authenticated yet, the only timer that could be + * running is the timeout for the authentication response which + * which is not relevant anymore. + */ + del_timer_sync(&sdata->u.mgd.timer); sta_info_destroy_addr(sdata, auth_data->bss->bssid); memset(sdata->u.mgd.bssid, 0, ETH_ALEN); @@ -2765,6 +2771,12 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, sdata_assert_lock(sdata); if (!assoc) { + /* + * we are not associated yet, the only timer that could be + * running is the timeout for the association response which + * which is not relevant anymore. + */ + del_timer_sync(&sdata->u.mgd.timer); sta_info_destroy_addr(sdata, assoc_data->bss->bssid); memset(sdata->u.mgd.bssid, 0, ETH_ALEN);