Re: [PATCH v3 net] ipv6: Fix dangling pointer when ipv6 fragment
From: hujunwei
Date: Tue Apr 02 2019 - 21:33:48 EST
On 2019/4/2 23:34, Martin Lau wrote:
> On Tue, Apr 02, 2019 at 06:49:03PM +0800, kbuild test robot wrote:
>> Hi hujunwei,
>>
>> Thank you for the patch! Perhaps something to improve:
>>
>> [auto build test WARNING on net/master]
>>
>>
>> vim +/prevhdr +609 net//ipv6/ip6_output.c
>>
>> 594
>> 595 int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
>> 596 int (*output)(struct net *, struct sock *, struct sk_buff *))
>> 597 {
>> 598 struct sk_buff *frag;
>> 599 struct rt6_info *rt = (struct rt6_info *)skb_dst(skb);
>> 600 struct ipv6_pinfo *np = skb->sk && !dev_recursion_level() ?
>> 601 inet6_sk(skb->sk) : NULL;
>> 602 struct ipv6hdr *tmp_hdr;
>> 603 struct frag_hdr *fh;
>> 604 unsigned int mtu, hlen, left, len, nexthdr_offset;
>> 605 int hroom, troom;
>> 606 __be32 frag_id;
>> 607 int ptr, offset = 0, err = 0;
>> 608 u8 *prevhdr, nexthdr = 0;
>> > 609 nexthdr_offset = prevhdr - skb_network_header(skb);
> hmm... This line has been moved up since v2. :(
Hi Martin,
Thank you for your remind, I sorry for this, i send the patch v4 yesterday.