Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1878479yba; Tue, 2 Apr 2019 18:34:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0b24pnCDxkAuSJGJOjcHdIvlc+XumEYbGMre5gguIJ66SVVi4XMrAkSptjEJ07jmMpZpH X-Received: by 2002:a17:902:4383:: with SMTP id j3mr55956426pld.58.1554255281334; Tue, 02 Apr 2019 18:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554255281; cv=none; d=google.com; s=arc-20160816; b=LDAJGcZpAENIE7N8fl2FYw1oWzL0QcOlcSwY11zWd2BaLjiHHjNkYjzJAO5Y9nzLDM O6S8LVeD4oSoC+t0teJFkaUeiYDFV0Fal8LoAiyX2ornd85hdJ8L2fmarLV/xkTLeqGo qm6J8kY0AKp5Akzv96r83oapm41gVNjxGCX75ecqVJHXDU4MpLfQMCvJZX6QMJWFjH7N JXlmoIGwJJcvFKWatzERnauZTuTKRYDpok/Az/YiC5zZZc4EKhKzp2N3/qKoztkewoXI 52RRVl7IGuAj1Ul9gq5XtBVvlQ1ZOJM4vZBsb4Yp6w+D+7/szt56FrH3aKj4+c3U1nbV B15w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GsDKsTAim462FtnDo0K21KoNYSfh67/frcuiiXpvm28=; b=JPZtHIQl/gEAWwAsL/7qJSitgoHE8xARh//gqV7sT6U0LEDuk0fldh4rckiAnGo3kS wF0Hjh+Xm7TIgJvd4JF9uQOMDVjjn2fbyK2ucLlE/ecv1Fzs3bKtN9IZsfH8VLQem+eC rWCuKNKElsAL2giKR2iF0rDslN4I5vTkOld14Pe1fa3xFpQyfGeqEnYtEJSI/wO7vE3F UFIqIw3mqT6oeMOck02QAZdv0ZKfo0HSHZ9TSb0cNcyPJB0AvUWVVYxPLvt5pmmgjfGZ hrId1MQpMGlc2Nr0ASe24EaSYfclbbDLQ+LMWz3MxdmSEs3ThiyNQJlHOCfeclHOiFem 5Q9A== 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 j34si12440309pgb.64.2019.04.02.18.34.24; Tue, 02 Apr 2019 18:34:41 -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 S1726672AbfDCBdq (ORCPT + 99 others); Tue, 2 Apr 2019 21:33:46 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6216 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726071AbfDCBdq (ORCPT ); Tue, 2 Apr 2019 21:33:46 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [10.3.19.213]) by Forcepoint Email with ESMTP id 9CB0B24D6067CA4EE54E; Wed, 3 Apr 2019 09:33:43 +0800 (CST) Received: from [127.0.0.1] (10.184.191.73) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Wed, 3 Apr 2019 09:33:36 +0800 Subject: Re: [PATCH v3 net] ipv6: Fix dangling pointer when ipv6 fragment To: Martin Lau CC: "davem@davemloft.net" , "kuznet@ms2.inr.ac.ru" , "yoshfuji@linux-ipv6.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , , References: <44e8dcf8-bf64-0407-65bb-122d0853c672@huawei.com> <201904021813.GLngbeGC%lkp@intel.com> <20190402153413.wyg5w4x33qvzqpm6@kafai-mbp.dhcp.thefacebook.com> From: hujunwei Message-ID: Date: Wed, 3 Apr 2019 09:32:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190402153413.wyg5w4x33qvzqpm6@kafai-mbp.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.184.191.73] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.