From: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "qiang.zhang@windriver.com" <qiang.zhang@windriver.com>,
"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"aryabinin@virtuozzo.com" <aryabinin@virtuozzo.com>,
"dvyukov@google.com" <dvyukov@google.com>,
"andreyknvl@google.com" <andreyknvl@google.com>,
"qcai@redhat.com" <qcai@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<walter-zh.wu@mediatek.com>
Subject: Re: [PATCH] kasan: fix slab double free when cpu-hotplug
Date: Sun, 6 Dec 2020 00:17:15 +0800 [thread overview]
Message-ID: <1607185035.22062.42.camel@mtksdccf07> (raw)
In-Reply-To: <20201204172521.ed9f77164ff9f9fc91f35ee0@linux-foundation.org>
On Fri, 2020-12-04 at 17:25 -0800, Andrew Morton wrote:
> On Fri, 4 Dec 2020 20:01:35 +0800 Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> wrote:
>
> > > diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
> > > index d98b516f372f..55783125a767 100644
> > > --- a/mm/kasan/quarantine.c
> > > +++ b/mm/kasan/quarantine.c
> > > @@ -194,7 +194,6 @@ bool quarantine_put(struct kmem_cache *cache, void *object)
> > >
> > > q = this_cpu_ptr(&cpu_quarantine);
> > > if (q->offline) {
> > > - qlink_free(&meta->quarantine_link, cache);
> > > local_irq_restore(flags);
> > > return false;
Hi Andrew,
Return false will cause slab allocator to free the object.
Thus, we do not need to qlink_free here to free object twice.
The return value is introduced from Andrey's patch.
"kasan: sanitize objects when metadata doesn't fit"
> > > }
> >
> > Hi Qiang,
> >
> > Thanks for fixing this.
> > Due to that issue, my commit has been removed by Stephen from
> > linux-next.
> >
> >
> > Hi Stephen, Andrew,
> >
> > Should I directly upload the v4 or Stephen can pick the commit which
> > has been removed back to the linux-next.
>
> I took care of it. Restored the original patch and added this one as a
> -fix.
Thanks for taking care of it.
I think there are some problem in the patch you just restored.
I saw the restored patch is not based on Andrey's patch and Stephen's
fix conflict patch.
But the issue Qiang fixed need to be based on the Andrey's patch and
Stephen's fix conflict patch.
"kasan: sanitize objects when metadata doesn't fit"
"kasan-rename-get_alloc-free_info-fix"
If the restored patch is not based on that, it may cause some problems
and conflicts.
I think I can prepare a patch v4 based on Andrey's patch, fix the
conflict and include the Qiang's modification.
Thanks,
Kuan-Ying
next prev parent reply other threads:[~2020-12-05 17:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 10:22 [PATCH] kasan: fix slab double free when cpu-hotplug qiang.zhang
2020-12-04 12:01 ` Kuan-Ying Lee
2020-12-05 1:25 ` Andrew Morton
2020-12-05 16:17 ` Kuan-Ying Lee [this message]
2020-12-06 1:09 ` Andrew Morton
2020-12-07 2:06 ` Kuan-Ying Lee
2020-12-07 7:00 ` Kuan-Ying Lee
2020-12-11 13:43 ` Chris Down
2020-12-11 19:39 ` Andrew Morton
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=1607185035.22062.42.camel@mtksdccf07 \
--to=kuan-ying.lee@mediatek.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qcai@redhat.com \
--cc=qiang.zhang@windriver.com \
--cc=sfr@canb.auug.org.au \
--cc=walter-zh.wu@mediatek.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