[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20201211113909.230e68fcb66193aa71661ddd@linux-foundation.org>
Date: Fri, 11 Dec 2020 11:39:09 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Chris Down <chris@...isdown.name>
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@...iatek.com>,
"qiang.zhang@...driver.com" <qiang.zhang@...driver.com>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
"aryabinin@...tuozzo.com" <aryabinin@...tuozzo.com>,
"dvyukov@...gle.com" <dvyukov@...gle.com>,
"andreyknvl@...gle.com" <andreyknvl@...gle.com>,
"qcai@...hat.com" <qcai@...hat.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
walter-zh.wu@...iatek.com
Subject: Re: [PATCH] kasan: fix slab double free when cpu-hotplug
On Fri, 11 Dec 2020 13:43:39 +0000 Chris Down <chris@...isdown.name> wrote:
> Hi folks,
>
> Andrew Morton writes:
> >@@ -188,6 +190,10 @@ void quarantine_put(struct kasan_free_me
> > local_irq_save(flags);
> >
> > q = this_cpu_ptr(&cpu_quarantine);
> >+ if (q->offline) {
> >+ local_irq_restore(flags);
> >+ return;
> >+ }
> > qlist_put(q, &info->quarantine_link, cache->size);
> > if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) {
> > qlist_move_all(q, &temp);
>
> I'm afraid as well as the issues already identified, this also fails, because
> `quarantine_put` now returns a bool after "kasan: sanitize objects when
> metadata doesn't fit":
>
> mm/kasan/quarantine.c: In function ‘quarantine_put’:
> mm/kasan/quarantine.c:198:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
> 198 | return;
> | ^~~~~~
> mm/kasan/quarantine.c:171:6: note: declared here
> 171 | bool quarantine_put(struct kmem_cache *cache, void *object)
Yup, thanks. I think I have this all fixed now, using the old
apply-one-patch-compile-everything-repeat approach.
Powered by blists - more mailing lists