[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD-N9QVRuBAER0o1H6eTre_YOU+4mbHuj3homHno0UHiJrXuUg@mail.gmail.com>
Date: Wed, 18 Aug 2021 18:39:25 +0800
From: Dongliang Mu <mudongliangabcd@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert@...unet.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
syzbot+b9cfd1cc5d57ee0a09ab@...kaller.appspotmail.com,
stable@...r.kernel.org,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: xfrm: assign the per_cpu_ptr pointer before return
On Wed, Aug 18, 2021 at 11:32 AM Herbert Xu <herbert@...dor.apana.org.au> wrote:
>
> On Wed, Aug 18, 2021 at 11:25:53AM +0800, Dongliang Mu wrote:
> >
> > diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c
> > index cb40ff0ff28d..01dbec70dfba 100644
> > --- a/net/xfrm/xfrm_ipcomp.c
> > +++ b/net/xfrm/xfrm_ipcomp.c
> > @@ -223,9 +223,9 @@ static void * __percpu *ipcomp_alloc_scratches(void)
> > void *scratch;
> >
> > scratch = vmalloc_node(IPCOMP_SCRATCH_SIZE, cpu_to_node(i));
> > + *per_cpu_ptr(scratches, i) = scratch;
> > if (!scratch)
> > return NULL;
> > - *per_cpu_ptr(scratches, i) = scratch;
>
> scratches comes from alloc_percpu so it should already be zeroed.
Correct.
:\ Then I have no idea how this crash occurs. This crash report does
not have any reproducer. It seems like a random crash, but I am not
sure.
If you have any patch for this crash, please let me know.
>
> Cheers,
> --
> Email: Herbert Xu <herbert@...dor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists