lkml.org 
[lkml]   [2019]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mm/kmemleak: skip late_init if not skip disable
Hi,

On Wed, Oct 9, 2019 at 12:51 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> Hi Murphy,
>
> On Sun, Sep 29, 2019 at 05:56:59PM +0800, Murphy Zhou wrote:
> > Now if DEFAULT_OFF set to y, kmemleak_init will start the cleanup_work
> > workqueue. Then late_init call will set kmemleak_initialized to 1, the
> > cleaup workqueue will try to do cleanup, triggering:
> >
> > [24.738773] ==================================================================
> > [24.742784] BUG: KASAN: global-out-of-bounds in __kmemleak_do_cleanup+0x166/0x180
>
> I don't think the invocation of kmemleak_do_cleanup() is the issue here.
> It should be safe schedule the clean-up thread in case kmemleak was
> disabled from boot. What you probably hit was a bug in
> __kmemleak_do_cleanup() itself, fixed here:
>
> http://lkml.kernel.org/r/20191004134624.46216-1-catalin.marinas@arm.com
>
> With the above patch, I can no longer trigger the KASan warning.

Got it. Thanks for noticing!

>
> --
> Catalin

\
 
 \ /
  Last update: 2019-10-10 07:03    [W:0.047 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site