mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Murphy Zhou <jencce.kernel@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/kmemleak: skip late_init if not skip disable
Date: Tue, 8 Oct 2019 17:51:00 +0100	[thread overview]
Message-ID: <20191008165100.GC5694@arrakis.emea.arm.com> (raw)
In-Reply-To: <20190929095659.jzy3gtcj6vgd35j6@XZHOUW.usersys.redhat.com>

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

  reply	other threads:[~2019-10-08 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-29  9:56 Murphy Zhou
2019-10-08 16:51 ` Catalin Marinas [this message]
2019-10-10  5:02   ` Murphy Zhou

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=20191008165100.GC5694@arrakis.emea.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®