From patchwork Thu Sep 20 12:58:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 1484981 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 80F4CDF2D2 for ; Thu, 20 Sep 2012 12:54:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113Ab2ITMyE (ORCPT ); Thu, 20 Sep 2012 08:54:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:63019 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427Ab2ITMyB (ORCPT ); Thu, 20 Sep 2012 08:54:01 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Sep 2012 05:53:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,453,1344236400"; d="asc'?scan'208";a="208672154" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 20 Sep 2012 05:53:51 -0700 Received: from [10.237.72.162] (sauron.fi.intel.com [10.237.72.162]) by linux.intel.com (Postfix) with ESMTP id A73E52C8001; Thu, 20 Sep 2012 05:53:51 -0700 (PDT) Message-ID: <1348145936.2388.18.camel@sauron.fi.intel.com> Subject: Re: regression: tethering fails in 3.5 with iwlwifi From: Artem Bityutskiy Reply-To: artem.bityutskiy@linux.intel.com To: Eric Dumazet Cc: Johannes Berg , linux-wireless@vger.kernel.org, netdev Date: Thu, 20 Sep 2012 15:58:56 +0300 In-Reply-To: References: <1347361823.26457.3.camel@sauron.fi.intel.com> <1DC40B07CD6EC041A66726C271A73AE6195AE9C8@IRSMSX102.ger.corp.intel.com> <1347631355.5263.19.camel@sauron.fi.intel.com> <1347640763.5263.24.camel@sauron.fi.intel.com> <1347892887.7112.9.camel@sauron.fi.intel.com> <1348142775.2388.10.camel@sauron.fi.intel.com> <1348144524.4161.26.camel@jlt4.sipsolutions.net> X-Mailer: Evolution 3.4.4 (3.4.4-1.fc17) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote: > I guess you only need to make sure 14 bytes of ethernet header are > available before eth_type_trans(skb, dev); > > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c > index 61c621e..ffe5f84 100644 > --- a/net/mac80211/rx.c > +++ b/net/mac80211/rx.c > @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) > > if (skb) { > /* deliver to local stack */ > - skb->protocol = eth_type_trans(skb, dev); > - memset(skb->cb, 0, sizeof(skb->cb)); > - netif_receive_skb(skb); > + if (pskb_may_pull(skb, sizeof(struct ethhdr))) { > + skb->protocol = eth_type_trans(skb, dev); > + memset(skb->cb, 0, sizeof(skb->cb)); > + netif_receive_skb(skb); > + } else { > + kfree_skb(skb); > + } > } > } Does not help, this one does: diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 61c621e..6888586 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1797,6 +1797,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) /* deliver to local stack */ skb->protocol = eth_type_trans(skb, dev); memset(skb->cb, 0, sizeof(skb->cb)); + skb_linearize(skb); netif_receive_skb(skb); }