From patchwork Fri Mar 1 15:01:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Porsch X-Patchwork-Id: 2201891 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 C5978DF24C for ; Fri, 1 Mar 2013 15:01:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750721Ab3CAPB2 (ORCPT ); Fri, 1 Mar 2013 10:01:28 -0500 Received: from mail-bk0-f53.google.com ([209.85.214.53]:49060 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750696Ab3CAPB1 (ORCPT ); Fri, 1 Mar 2013 10:01:27 -0500 Received: by mail-bk0-f53.google.com with SMTP id j10so1377536bkw.26 for ; Fri, 01 Mar 2013 07:01:26 -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=ytRbB/FOQG+WVTfX2ln2c+19DhsGX5H1iLzuG6BzgRY=; b=Cn1NBAbB2oRcNTjyHptQPzRIptRln5MRSVC6/WzrFZ81T8uk6LGwb/f934Grq+QhSY VeGzJctH0TDZBK04NaB/+216Axmnr6CpCsVSObWLhs6CHHcZbIZCehxvR5Kmoeathiyu JKYYiO9HDuae9LYPlHWpu0trxfc19ws2TbDvMsOYx+kw7dlegaec4WcN7Hn1zDKMGMyA O7yAR+p9gtLE5RN4ShLb7Fal8lpJezXB4pHeiluv+Rcd69HO4sD8wsAE3Zxo0/qlSCWg Ys+v0OXq2jkxiwKK77GIQEwtaaj7vlvX7CQ1nWdvcp3pPHCWN2WS0OiYfiynzWr82p6h lyAQ== X-Received: by 10.204.147.92 with SMTP id k28mr4069283bkv.107.1362150086410; Fri, 01 Mar 2013 07:01:26 -0800 (PST) Received: from X220-marco.infotech.tu-chemnitz.de (perseus.infotech.tu-chemnitz.de. [134.109.4.8]) by mx.google.com with ESMTPS id z6sm2976534bkv.11.2013.03.01.07.01.24 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 07:01:25 -0800 (PST) From: Marco Porsch To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Marco Porsch Subject: [PATCH] mac80211: fix oops on mesh PS broadcast forwarding Date: Fri, 1 Mar 2013 16:01:18 +0100 Message-Id: <1362150078-10802-1-git-send-email-marco@cozybit.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlT8Mfv74Bf94jnPLDraKsE+8mAVCibR0IpyAan0g/Z6e3+j7aSYQwTM9ZfmAJctX2ITSbk Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Introduced with de74a1d9032f4d37ea453ad2a647e1aff4cd2591 "mac80211: fix WPA with VLAN on AP side with ps-sta". Apparently overwrites the sdata pointer with non-valid data in the case of mesh. Fix this by checking for IFTYPE_AP_VLAN. Signed-off-by: Marco Porsch --- net/mac80211/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c79860f..cb4b9ab 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2749,7 +2749,8 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, cpu_to_le16(IEEE80211_FCTL_MOREDATA); } - sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev); + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) + sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev); if (!ieee80211_tx_prepare(sdata, &tx, skb)) break; dev_kfree_skb_any(skb);