lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/kmemleak: skip late_init if not skip disable
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.

--
Catalin

\
 
 \ /
  Last update: 2019-10-08 18:51    [W:0.103 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site