From patchwork Mon Feb 4 22:12:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2095251 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2CD6EDFE82 for ; Mon, 4 Feb 2013 22:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755333Ab3BDWNr (ORCPT ); Mon, 4 Feb 2013 17:13:47 -0500 Received: from mail-ia0-f178.google.com ([209.85.210.178]:54341 "EHLO mail-ia0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185Ab3BDWNq (ORCPT ); Mon, 4 Feb 2013 17:13:46 -0500 Received: by mail-ia0-f178.google.com with SMTP id y26so8568489iab.37 for ; Mon, 04 Feb 2013 14:13:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=/Bw5J6fcU/uJQDhPCtjwsgPiSKNlzz0Ux4QSJSMmfdo=; b=AezgyN4w4b7203oKl1m6w+DDq0F+ykJPZWGxQraFovDTkfNKA+zJSyHvk4pCeoY8Q7 Lc+584eZHHquZiA/5FI2cebWQqIXtEJZDPp5FB77J33jfiXQYY57BZ8d3ufUmW9o56dG akMZVrILgNvVLOIVavK08M5Se+YDAO5wCEPvEBMJfwmaUKdjmAH1D41bu4NVHyjxJRZp 9U48eZQ4XKPdawMINci3hZgTBqwnsGZKyLxvjK1d7T7wA34Dl6u3nDpNDivc1FMff8cG oFM3r7O2pKAMpDzAma9x4gvvxM7O/PxlE295ZmYRe4QaMN9lx0fZ+zPQm0evHK1XyObG Cxvw== X-Received: by 10.50.197.169 with SMTP id iv9mr9075835igc.32.1360016026298; Mon, 04 Feb 2013 14:13:46 -0800 (PST) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id xd4sm18598753igb.3.2013.02.04.14.13.44 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 14:13:45 -0800 (PST) From: Thomas Pedersen To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, emmanuel.grumbach@intel.com, Thomas Pedersen Subject: [PATCH] mac80211: stop plink timer only on mesh interfaces Date: Mon, 4 Feb 2013 14:12:41 -0800 Message-Id: <1360015961-5922-1-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmebVgVaiidTSCXiTmqXiHhxn9p4W8S+FgSUXS7hG4jBWz60rQVMoD49j21u73F959Ha+RA Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Since mesh_plink_quiesce() would unconditionally delete the plink timer, and the timer initialization was recently moved into the mesh code path, suspending with a non-mesh interface now causes a crash. Fix this by only deleting the plink timer for mesh interfaces. Reported-by: Emmanuel Grumbach Signed-off-by: Thomas Pedersen Tested-by: Emmanuel Grumbach --- Hi Emmanuel, Will you please test this patch? net/mac80211/mesh_plink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 81e6126..1f40c4a 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -528,6 +528,9 @@ static void mesh_plink_timer(unsigned long data) #ifdef CONFIG_PM void mesh_plink_quiesce(struct sta_info *sta) { + if (!ieee80211_vif_is_mesh(&sta->sdata->vif)) + return; + if (del_timer_sync(&sta->plink_timer)) sta->plink_timer_was_running = true; }