From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] ipv6: don't get lwtstate twice in ip6_rt_copy_init() Date: Sat, 01 Sep 2018 17:43:39 -0700 (PDT) Message-ID: <20180901.174339.431652509255896783.davem@davemloft.net> References: <1535645484-30629-1-git-send-email-alexey.kodanev@oracle.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com To: alexey.kodanev@oracle.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:54192 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbeIBE50 (ORCPT ); Sun, 2 Sep 2018 00:57:26 -0400 In-Reply-To: <1535645484-30629-1-git-send-email-alexey.kodanev@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Alexey Kodanev Date: Thu, 30 Aug 2018 19:11:24 +0300 > Commit 80f1a0f4e0cd ("net/ipv6: Put lwtstate when destroying fib6_info") > partially fixed the kmemleak [1], lwtstate can be copied from fib6_info, > with ip6_rt_copy_init(), and it should be done only once there. > > rt->dst.lwtstate is set by ip6_rt_init_dst(), at the start of the function > ip6_rt_copy_init(), so there is no need to get it again at the end. > > With this patch, lwtstate also isn't copied from RTF_REJECT routes. ... > Fixes: 6edb3c96a5f0 ("net/ipv6: Defer initialization of dst to data path") > Signed-off-by: Alexey Kodanev Applied and queued up for -stable, thanks.