From patchwork Fri May 13 21:16:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 784022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DLGJc6015125 for ; Fri, 13 May 2011 21:16:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756558Ab1EMVQR (ORCPT ); Fri, 13 May 2011 17:16:17 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:61300 "EHLO mail-px0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756543Ab1EMVQQ (ORCPT ); Fri, 13 May 2011 17:16:16 -0400 Received: by pxi16 with SMTP id 16so1912055pxi.4 for ; Fri, 13 May 2011 14:16:16 -0700 (PDT) Received: by 10.68.20.38 with SMTP id k6mr2832386pbe.410.1305321376205; Fri, 13 May 2011 14:16:16 -0700 (PDT) Received: from localhost.localdomain (99-8-184-170.lightspeed.snfcca.sbcglobal.net [99.8.184.170]) by mx.google.com with ESMTPS id r9sm1581807pbl.96.2011.05.13.14.16.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2011 14:16:15 -0700 (PDT) From: Javier Cardona To: "John W. Linville" Cc: Javier Cardona , Thomas Pedersen , devel@lists.open80211s.org, Johannes Berg , linux-wireless@vger.kernel.org, jlopex@gmail.com Subject: [PATCH] mac80211: Deactivate mesh path timers when freeing nodes Date: Fri, 13 May 2011 14:16:07 -0700 Message-Id: <1305321367-2850-1-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.7.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 21:16:19 +0000 (UTC) Mesh paths are deleted via mesh_path_del() which properly deactivates the timer associated to a mesh path. But if paths were deleted by mesh_table_free(..., true) timers would not be deactivated. This fixes this case. Reported-by: Johannes Berg Signed-off-by: Javier Cardona --- net/mac80211/mesh_pathtbl.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index a1d59bd..2a0302a 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -673,8 +673,10 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs) struct mpath_node *node = hlist_entry(p, struct mpath_node, list); mpath = node->mpath; hlist_del_rcu(p); - if (free_leafs) + if (free_leafs) { + del_timer_sync(&mpath->timer); kfree(mpath); + } kfree(node); }