Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1405948

Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom
Date 2016-05-24 10:50 +0200
Message-ID <rCgch-YP-3@gated-at.bofh.it> (permalink)
References <rC0Ax-861-1@gated-at.bofh.it> <rC29j-u0-7@gated-at.bofh.it> <rCgch-YP-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 24-05-16 11:43:19, Vladimir Davydov wrote:
> On Mon, May 23, 2016 at 07:44:43PM +0200, Michal Hocko wrote:
> > On Mon 23-05-16 19:02:10, Vladimir Davydov wrote:
> > > mem_cgroup_oom may be invoked multiple times while a process is handling
> > > a page fault, in which case current->memcg_in_oom will be overwritten
> > > leaking the previously taken css reference.
> > 
> > Have you seen this happening? I was under impression that the page fault
> > paths that have oom enabled will not retry allocations.
> 
> filemap_fault will, for readahead.

I thought that the readahead is __GFP_NORETRY so we do not trigger OOM
killer.

> This is rather unlikely, just like the whole oom scenario, so I haven't
> faced this leak in production yet, although it's pretty easy to
> reproduce using a contrived test. However, even if this leak happened on
> my host, I would probably not notice, because currently we have no clear
> means of catching css leaks. I'm thinking about adding a file to debugfs
> containing brief information about all memory cgroups, including dead
> ones, so that we could at least see how many dead memory cgroups are
> dangling out there.

Yeah, debugfs interface would make some sense.
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm: memcontrol: fix possible css ref leak on oom Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-05-23 18:10 +0200
  Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Michal Hocko <mhocko@kernel.org> - 2016-05-23 19:50 +0200
    Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Michal Hocko <mhocko@kernel.org> - 2016-05-24 10:50 +0200
      Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-05-24 11:20 +0200
        Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Michal Hocko <mhocko@kernel.org> - 2016-05-24 11:30 +0200
          Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-05-24 12:10 +0200
            Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Michal Hocko <mhocko@kernel.org> - 2016-05-24 13:40 +0200
    Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-05-24 11:20 +0200
  Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Johannes Weiner <hannes@cmpxchg.org> - 2016-05-27 19:40 +0200
    Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-05-29 11:20 +0200
    Re: [PATCH] mm: memcontrol: fix possible css ref leak on oom Michal Hocko <mhocko@kernel.org> - 2016-05-30 09:30 +0200

csiph-web