linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: David Ahern <dsahern@kernel.org>
Cc: kernel test robot <oliver.sang@intel.com>,
	Wangyang Guo <wangyang.guo@intel.com>,
	Jakub Kicinski <kuba@kernel.org>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, steffen.klassert@secunet.com
Subject: Re: [linux-next:master] [net] d288a162dd: canonical_address#:#[##]
Date: Wed, 19 Apr 2023 08:59:16 +0300	[thread overview]
Message-ID: <20230419055916.GB44666@unreal> (raw)
In-Reply-To: <509b08bd-d2bf-eaa8-6c49-c0860d1adbe0@kernel.org>

On Tue, Apr 18, 2023 at 02:43:02PM -0600, David Ahern wrote:
> On 4/18/23 10:41 AM, Leon Romanovsky wrote:
> > Hi,
> > 
> > I came to the following diff which eliminates the kernel panics,
> > unfortunately I can explain only second hunk, but first is required
> > too.
> > 
> > diff --git a/net/core/dst.c b/net/core/dst.c
> > index 3247e84045ca..750c8edfe29a 100644
> > --- a/net/core/dst.c
> > +++ b/net/core/dst.c
> > @@ -72,6 +72,8 @@ void dst_init(struct dst_entry *dst, struct dst_ops *ops,
> >         dst->flags = flags;
> >         if (!(flags & DST_NOCOUNT))
> >                 dst_entries_add(ops, 1);
> > +
> > +       INIT_LIST_HEAD(&dst->rt_uncached);
> 
> d288a162dd1c73507da582966f17dd226e34a0c0 moved rt_uncached from rt6_info
> and rtable to dst_entry. Only ipv4 and ipv6 usages initialize it. Since
> it is now in dst_entry, dst_init is the better place so it can be
> removed from rt_dst_alloc and rt6_info_init.

This is why I placed it there, but the rt_uncached list is initialized
in xfrm6 right before first call to rt6_uncached_list_add().

   70 static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
   71                           const struct flowi *fl)
   72 {
...
   92         INIT_LIST_HEAD(&xdst->u.rt6.dst.rt_uncached);
   93         rt6_uncached_list_add(&xdst->u.rt6);

My silly explanation is that xfrm6_dst_destroy() can be called before xfrm6_fill_dst().

Thanks

> 


  reply	other threads:[~2023-04-19  5:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-16 14:27 kernel test robot
2023-04-18 16:41 ` Leon Romanovsky
2023-04-18 20:43   ` David Ahern
2023-04-19  5:59     ` Leon Romanovsky [this message]
2023-04-19  7:02       ` Leon Romanovsky
2023-04-19  8:41       ` Eric Dumazet
2023-04-19  8:59         ` Leon Romanovsky

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=20230419055916.GB44666@unreal \
    --to=leon@kernel.org \
    --cc=arjan@linux.intel.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=steffen.klassert@secunet.com \
    --cc=tglx@linutronix.de \
    --cc=wangyang.guo@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox