From patchwork Sun Jan 27 01:00:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2050761 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 346943FDBC for ; Sun, 27 Jan 2013 01:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754984Ab3A0BBE (ORCPT ); Sat, 26 Jan 2013 20:01:04 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33254 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754942Ab3A0BBD (ORCPT ); Sat, 26 Jan 2013 20:01:03 -0500 Received: by mail-pa0-f51.google.com with SMTP id fb11so898565pad.10 for ; Sat, 26 Jan 2013 17:01:02 -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=v3ggxsCauCXTDnzqGJL/hMdflXCCSUD+f8CfNFhy3OM=; b=Hj2auzmhQYtt7k8jzrTMHKrraw90xam1aJ3g9r9SqN2cJt4W557L3oOQsLOdyjVnua Kbw/x299bV6azxuE6DKXSn0yQ1Zi5/Z3AO2epPC/BFUMZZ9urDMEzXCHHIPArwPnuSYE 0p+nqUvJbcnryp4bVitDTFvXND6xqjCJ46fLZc/zOhKVD6NOl/Wmjzamhmd8vcSXDVje XovzeUECV21fDLN/O5Gg6PqcW9Z2g48QZ5mUPyy5zqT3GF/2dRrX8wWzoL59DtCZq4Th f3mGBpJqsVXNofe28ZOsiBtcWzQ9zGucnDjl5bpCep/725b25UQmKC34CRacpQiO3d1D +DqQ== X-Received: by 10.68.234.36 with SMTP id ub4mr26274286pbc.68.1359248462231; Sat, 26 Jan 2013 17:01:02 -0800 (PST) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id th10sm3391537pbc.76.2013.01.26.17.01.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Jan 2013 17:01:01 -0800 (PST) From: Thomas Pedersen To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Thomas Pedersen Subject: [PATCH] mac80211: fix mesh_sta_info_get() reshuffle damage Date: Sat, 26 Jan 2013 17:00:02 -0800 Message-Id: <1359248402-6595-1-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQm9trGqj6cXHlmPCSqxpinbjjk5JRiSfCPviBkj+2mNljn7p69s8ypPlWlQtfWh5n8Aq2xq Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Before "mac80211: clean up mesh sta allocation warning" was applied, mesh_sta_info_get() was reshuffled to please sparse. As a result we neglect to initialize newly created STAs. Fix this. Signed-off-by: Thomas Pedersen --- net/mac80211/mesh_plink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index ca4f2d8..6787d69 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -468,6 +468,8 @@ mesh_sta_info_get(struct ieee80211_sub_if_data *sdata, return NULL; } + mesh_sta_info_init(sdata, sta, elems, true); + if (sta_info_insert_rcu(sta)) return NULL; }