Received: by 10.192.165.148 with SMTP id m20csp1006909imm; Fri, 27 Apr 2018 11:00:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp/YDg8omvUZg2qYroS84AVozbX10bCdWbzH4tp2qLNj2n63oAueIIUwS2GRZyS709qMQMr X-Received: by 10.98.156.13 with SMTP id f13mr2101939pfe.15.1524852039147; Fri, 27 Apr 2018 11:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524852039; cv=none; d=google.com; s=arc-20160816; b=bxaxzyCiVtc/oBRLqUQYl6ML39blDoW6KYltJ9X8SkNnjh1nH9HG6rnTQqRZt2n75I Hxe1qpAYfOGO4AiHwOM2i/AcMFe1F8x8sZzZND7b5mX2mhMr7S79AzcSiWSKnFxw+vfZ J5Dd7DKaCJuMG9oK3rQHabbvDq3lpKDtnA6A8MmTJheeBuaN4YKVyO7GjRJk27ah0/en K2l57AUvrIWAHyNO6b9dQSULKkBDtnFGUDJztCG49Qx3aSOtXElJSn2X7lncfEWeNgLo pXHXNewQ1ipwmM2QV2Z+2HoXKCCr/lsPvn9HkA56Xk7SYL+zHuJT5kMHdsxfvIAfJuQy mWrA== 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:from:subject:cc:to:message-id:date :arc-authentication-results; bh=WIwG9XjfsQlM9dwBjVjYiPJJZbECtqCeD6Ak4vCDagk=; b=vJZG/lWOtuQRY3kB2NVRwqHGnT+5LIso/arrjAbBJj/AQrAQ1NjyEXSp8L0nsrgpw6 ESBgm0iYGNsYqLT/SuH1AkipQcwUlY0wpefS1UzLJod0hHYB3A6d471fbbTbM1BWogDl keFqGxWgWFIHZZmAyPb/yuS7eI6rcOrnEgNVWw9NqOX1c39gJRbEtR56+9FBaQzbP9Kp NfiT5KPHHTsSMcfLC5aM/siUAqLjFFUirt6UJoVzVy6JCKH8hi+faopiW0iIMCXja359 jjZ2Y95f519KKyLsCvAsc2JP2IEAD2rb3sKUejWmuxt9P1MoOrQTxgSbT/fArZ0fA4Ny 8P+w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12-v6si1605622pgs.164.2018.04.27.11.00.25; Fri, 27 Apr 2018 11:00:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757617AbeD0R7L (ORCPT + 99 others); Fri, 27 Apr 2018 13:59:11 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:55604 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbeD0R7J (ORCPT ); Fri, 27 Apr 2018 13:59:09 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E9D8B1008912E; Fri, 27 Apr 2018 10:59:08 -0700 (PDT) Date: Fri, 27 Apr 2018 13:59:07 -0400 (EDT) Message-Id: <20180427.135907.1528151032821602074.davem@davemloft.net> To: amsalam20@gmail.com Cc: dav.lebrun@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel" From: David Miller In-Reply-To: <1524751871-1353-1-git-send-email-amsalam20@gmail.com> References: <1524751871-1353-1-git-send-email-amsalam20@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 27 Apr 2018 10:59:09 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ahmed Abdelsalam Date: Thu, 26 Apr 2018 16:11:11 +0200 > @@ -119,6 +119,9 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh, int proto) > int hdrlen, tot_len, err; > __be32 flowlabel; > > + inner_hdr = ipv6_hdr(skb); You have to make this assignment after, not before, the skb_cow_header() call. Otherwise this point can be pointing to freed up memory.