linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: mhocko@suse.com
Cc: malat@debian.org, dvyukov@google.com, linux-mm@kvack.org,
	catalin.marinas@arm.com, chuhu@redhat.com
Subject: Re: [PATCH] kmemleak: don't use __GFP_NOFAIL
Date: Tue, 29 May 2018 06:05:45 +0900	[thread overview]
Message-ID: <201805290605.DGF87549.LOVFMFJQSOHtFO@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20180528132410.GD27180@dhcp22.suse.cz>

Michal Hocko wrote:
> I've found the previous report [1] finally. Adding Chunyu Hu to the CC
> list. The report which triggered this one is [2]
> 
> [1] http://lkml.kernel.org/r/1524243513-29118-1-git-send-email-chuhu@redhat.com
> [2] http://lkml.kernel.org/r/CA+7wUswp_Sr=hHqi1bwRZ3FE2wY5ozZWZ8Z1BgrFnSAmijUKjA@mail.gmail.com
> 
> I am not really familiar with the kmemleak code but the expectation that
> you can make a forward progress in an unknown allocation context seems
> broken to me. Why kmemleak cannot pre-allocate a pool of object_cache
> and refill it from a reasonably strong contexts (e.g. in a sleepable
> context)?

Or, we can undo the original allocation if the kmemleak allocation failed?

kmalloc(size, gfp) {
  ptr = do_kmalloc(size, gfp);
  if (ptr) {
    object = do_kmalloc(size, gfp_kmemleak_mask(gfp));
    if (!object) {
      kfree(ptr);
      return NULL;
    }
    // Store information of ptr into object.
  }
  return ptr;
}

  reply	other threads:[~2018-05-28 21:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26  7:14 WARNING: CPU: 0 PID: 21 at ../mm/page_alloc.c:4258 __alloc_pages_nodemask+0xa88/0xfec Mathieu Malaterre
2018-05-28  8:34 ` Michal Hocko
2018-05-28 13:05   ` [PATCH] kmemleak: don't use __GFP_NOFAIL Tetsuo Handa
2018-05-28 13:24     ` Michal Hocko
2018-05-28 21:05       ` Tetsuo Handa [this message]
2018-05-29 13:27         ` Chunyu Hu
2018-05-29 13:46           ` Tetsuo Handa
2018-05-30  9:35             ` Chunyu Hu
2018-05-30 10:46               ` Michal Hocko
2018-05-30 11:42                 ` Chunyu Hu
2018-05-30 12:38                   ` Michal Hocko
2018-05-31 10:51                     ` Chunyu Hu
2018-05-31 11:35                       ` Michal Hocko
2018-05-31 12:28                         ` Chunyu Hu
2018-05-31 15:22                     ` Catalin Marinas
2018-05-31 18:41                       ` Michal Hocko
2018-06-01  1:50                         ` Chunyu Hu
2018-06-01  4:53                           ` Chunyu Hu
2018-06-04  8:41                             ` Dmitry Vyukov
2018-06-04 12:42                               ` Michal Hocko
2018-06-04 15:08                                 ` Catalin Marinas
2018-06-04 15:36                                   ` Dmitry Vyukov
2018-06-04 16:41                                     ` Catalin Marinas

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=201805290605.DGF87549.LOVFMFJQSOHtFO@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=catalin.marinas@arm.com \
    --cc=chuhu@redhat.com \
    --cc=dvyukov@google.com \
    --cc=linux-mm@kvack.org \
    --cc=malat@debian.org \
    --cc=mhocko@suse.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