linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v3] mm: memcontrol: fix potential oom_lock recursion deadlock
Date: Fri, 22 Jul 2022 20:12:31 +0900	[thread overview]
Message-ID: <d1feb1b4-d7bb-0e7a-ae06-1adeb12b9c02@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <YtqEJToMl+uos+Td@dhcp22.suse.cz>

On 2022/07/22 20:04, Michal Hocko wrote:
> On Fri 22-07-22 19:45:39, Tetsuo Handa wrote:
>> syzbot is reporting GFP_KERNEL allocation with oom_lock held when reporting
>> memcg OOM [1]. Such allocation request might deadlock the system, for
>> __alloc_pages_may_oom() cannot invoke global OOM killer due to oom_lock
>> being already held by the caller.
> 
> OK, I have misunderstood your previous wording and now I have realized
> that there are 2 issues here. One of them is a (less likely) dead lock on
> the oom_lock not making a fwd progress (that would require global OOM
> racing with memcg OOM)  and the other is the GFP_NOFS->GFP_KERNEL dependency
> which can deadlock even without global the above race.
> Correct?

Correct.

> 
> Sorry I could have realized that sooner.
> 

No problem. Thanks for suggestion.


      reply	other threads:[~2022-07-22 11:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000000000000471c2905e3c2c2c2@google.com>
2022-07-14 14:18 ` [syzbot] possible deadlock in start_this_handle (3) Jan Kara
     [not found]   ` <534fa596-0c29-0f1e-b292-53ad9c3dbbe3@I-love.SAKURA.ne.jp>
2022-07-15  1:39     ` Shakeel Butt
     [not found]       ` <03304bf8-d153-698f-0376-9e9a0ec1048e@I-love.SAKURA.ne.jp>
2022-07-20 23:49         ` [PATCH] mm: memcontrol: fix potential oom_lock recursion deadlock Tetsuo Handa
2022-07-21  8:01           ` Michal Hocko
2022-07-22  0:46             ` [PATCH v2] " Tetsuo Handa
2022-07-22  7:19               ` Michal Hocko
2022-07-22 10:45                 ` [PATCH v3] " Tetsuo Handa
2022-07-22 11:04                   ` Michal Hocko
2022-07-22 11:12                     ` Tetsuo Handa [this message]

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=d1feb1b4-d7bb-0e7a-ae06-1adeb12b9c02@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.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