Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp530424imm; Thu, 5 Jul 2018 04:44:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeoaDIlvLPBY0hiZQlNYlv0ihOT3pdGsswuK10goFFD0MmC30UMgGShjkgp81eh04CHvNyE X-Received: by 2002:a17:902:7891:: with SMTP id q17-v6mr5955042pll.186.1530791043229; Thu, 05 Jul 2018 04:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530791043; cv=none; d=google.com; s=arc-20160816; b=zk3SMmhDQJXxDgbVleG2OE48zpFjzL+CY37hj7JmK4kEdQjNnOBGbpfKJymHsJkbZx SkkQu1XwWdXcS+AUeMGgECw/57ns0U1lpCTgjgGM+oGwB79HlDQbd4AbDXbr2TaRrDqq Y9KOKdiF7t/BuIrcNqfCw1Dl5QXlhKoW8uu4XjQOFrmxbW2h/S0oW3FXNnY6EkW1etFi g3dLr/nh7JgI7PYDP6dNdmkHMfB9UN/kUeG/LHx7d/HUb3DGLJwDby74Z3zbr+oIkQB1 /89qqP+gp30u5CvIfTr0oPfO78KejCaitSxUESP8GORIvI1NX9InxXtHpTEPt2k3kaDQ THfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=ry7hKaqXmcLHyJ29BhRuLPQdDKOkpYi9j2xVbSaXKgM=; b=ZujXiVKU73rpwIYkLvtW2/m1OmT124W7urE4g1HFmLvrp+61UK4f68Qz0B/Jb4qDPF gL7irKDEGHhI12dwT0lDW7rrKdpAn5l/sDdnjBwGZzQLVjRQjuxswnkH/SfhyJjk6/ox zEUkLEUstwINkbUh1iRY9Ia6qZbt20vYWHArWU4Eb8HIGQl+bRIypVk8otZ5P3jP2ffI lRO286RubOG6g0bfUrLKTdH0KrAWcg0whw22dQKQblWS7204K6nIaxYPkw5Bbn/lPx+a hqFjV3PCwrVUGDxQxAlPijZVOp/rwQWEyF9S+J+3gcHW1xKWBdegLCoVwlM5Dd1emCaK atiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z63-v6si6106711pfi.214.2018.07.05.04.43.49; Thu, 05 Jul 2018 04:44:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946AbeGELnC (ORCPT + 99 others); Thu, 5 Jul 2018 07:43:02 -0400 Received: from mga02.intel.com ([134.134.136.20]:28911 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753635AbeGELnA (ORCPT ); Thu, 5 Jul 2018 07:43:00 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2018 04:42:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,312,1526367600"; d="scan'208";a="62456804" Received: from jrissane-mobl.ger.corp.intel.com ([10.237.67.31]) by FMSMGA003.fm.intel.com with ESMTP; 05 Jul 2018 04:42:56 -0700 Message-ID: <1530790975.5103.16.camel@linux.intel.com> Subject: Re: [PATCH] 6lowpan: iphc: reset mac_header after decompress to fix panic From: Jukka Rissanen To: Michael Scott Cc: Alexander Aring , "David S. Miller" , linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 05 Jul 2018 14:42:55 +0300 In-Reply-To: <20180619234406.8217-1-michael@opensourcefoundries.com> References: <20180619234406.8217-1-michael@opensourcefoundries.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-06-19 at 16:44 -0700, Michael Scott wrote: > After decompression of 6lowpan socket data, an IPv6 header is > inserted > before the existing socket payload. After this, we reset the > network_header value of the skb to account for the difference in > payload > size from prior to decompression + the addition of the IPv6 header. > > > Signed-off-by: Michael Scott > --- > net/6lowpan/iphc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c > index 6b1042e21656..52fad5dad9f7 100644 > --- a/net/6lowpan/iphc.c > +++ b/net/6lowpan/iphc.c > @@ -770,6 +770,7 @@ int lowpan_header_decompress(struct sk_buff *skb, > const struct net_device *dev, > hdr.hop_limit, &hdr.daddr); > > skb_push(skb, sizeof(hdr)); > + skb_reset_mac_header(skb); > skb_reset_network_header(skb); > skb_copy_to_linear_data(skb, &hdr, sizeof(hdr)); > Acked-by: Jukka Rissanen Cheers, Jukka