From patchwork Fri Jul 24 23:57:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 37270 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6ONvYML028993 for ; Fri, 24 Jul 2009 23:57:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbZGXX52 (ORCPT ); Fri, 24 Jul 2009 19:57:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753295AbZGXX52 (ORCPT ); Fri, 24 Jul 2009 19:57:28 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:32864 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752672AbZGXX51 (ORCPT ); Fri, 24 Jul 2009 19:57:27 -0400 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MUUdh-0005uC-Nf; Fri, 24 Jul 2009 23:57:25 +0000 From: "Luis R. Rodriguez" To: linville@tuxdriver.com, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net, davidepesa@gmail.com, "Luis R. Rodriguez" Subject: [PATCH] mac80211: fix oops due to missing private data Date: Fri, 24 Jul 2009 19:57:25 -0400 Message-Id: <1248479845-22677-1-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.6.2.rc1.3.g81d3f Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This was caused by patch: "mac80211: cooperate more with network namespaces" The version of the patch applied doesn't match Johannes' latest: http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-mac80211-netns.patch The skb->cb virtual interface data wasn't being reset for reuse so ath9k pooped out when trying to dereference the private rate control info from the skb. BUG: unable to handle kernel NULL pointer dereference RIP: 0010:[] ath_tx_rc_status+0x33/0x150 [ath9k] <-- snip etc --> Reported-by: Davide Pesavento Signed-off-by: Luis R. Rodriguez --- net/mac80211/tx.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 1b9e081..2cf9ff7 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1170,13 +1170,15 @@ static int __ieee80211_tx(struct ieee80211_local *local, } ret = drv_tx(local, skb); - info->control.vif = &sdata->vif; if (WARN_ON(ret != NETDEV_TX_OK && skb->len != len)) { dev_kfree_skb(skb); ret = NETDEV_TX_OK; } - if (ret != NETDEV_TX_OK) + if (ret != NETDEV_TX_OK) { + info->control.vif = &sdata->vif; return IEEE80211_TX_AGAIN; + } + *skbp = skb = next; ieee80211_led_tx(local, 1); fragm = true;