LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Miller <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"
Date: Fri, 27 Apr 2018 13:59:07 -0400 (EDT)	[thread overview]
Message-ID: <20180427.135907.1528151032821602074.davem@davemloft.net> (raw)
In-Reply-To: <1524751871-1353-1-git-send-email-amsalam20@gmail.com>

From: Ahmed Abdelsalam <amsalam20@gmail.com>
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.

  reply	other threads:[~2018-04-27 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 14:11 Ahmed Abdelsalam
2018-04-27 17:59 ` David Miller [this message]
2018-04-28 10:20   ` Ahmed Abdelsalam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427.135907.1528151032821602074.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=amsalam20@gmail.com \
    --cc=dav.lebrun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel"' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).