[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKvoLUy=TMxW124tiixhOBL+SsV2jcmYhH8MFh3O75mow@mail.gmail.com>
Date: Tue, 5 Sep 2023 14:24:51 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Hillf Danton <hdanton@...a.com>
Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>, Netdev <netdev@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...nel.org>, Linus Torvalds <torvalds@...ux-foundation.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: selftests: net: pmtu.sh: Unable to handle kernel paging request
at virtual address
On Tue, Sep 5, 2023 at 1:52 PM Hillf Danton <hdanton@...a.com> wrote:
>
> On Mon, 4 Sep 2023 13:29:57 +0200 Eric Dumazet <edumazet@...gle.com>
> > On Sun, Sep 3, 2023 at 5:57=E2=80=AFAM Hillf Danton <hdanton@...a.com>
> > > On Thu, 31 Aug 2023 15:12:30 +0200 Eric Dumazet <edumazet@...gle.com>
> > > > --- a/net/core/dst.c
> > > > +++ b/net/core/dst.c
> > > > @@ -163,8 +163,13 @@ EXPORT_SYMBOL(dst_dev_put);
> > > >
> > > > void dst_release(struct dst_entry *dst)
> > > > {
> > > > - if (dst && rcuref_put(&dst->__rcuref))
> > > > + if (dst && rcuref_put(&dst->__rcuref)) {
> > > > + if (!(dst->flags & DST_NOCOUNT)) {
> > > > + dst->flags |= DST_NOCOUNT;
> > > > + dst_entries_add(dst->ops, -1);
> > >
> > > Could this add happen after the rcu sync above?
> > >
> > I do not think so. All dst_release() should happen before netns removal.
>
> cpu2 cpu3
> ==== ====
> cleanup_net() __sys_sendto
> sock_sendmsg()
> udpv6_sendmsg()
> synchronize_rcu();
> dst_release()
>
> Could this one be an exception?
No idea what you are trying to say.
Please give exact locations, instead of being rather vague.
Note that an UDP socket can not send a packet while its netns is dismantled,
because alive sockets keep a reference on the netns.
Powered by blists - more mailing lists