lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 21 Dec 2021 21:22:43 -0800
From:   Shakeel Butt <shakeelb@...gle.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>, Roman Gushchin <guro@...com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] memcg: add per-memcg vmalloc stat

On Tue, Dec 21, 2021 at 8:15 PM Muchun Song <songmuchun@...edance.com> wrote:
>
[...]
> > +static inline void mod_memcg_page_state(struct page *page,
> > +                                       int idx, int val)
> > +{
> > +       struct mem_cgroup *memcg = page_memcg(page);
> > +
> > +       if (!mem_cgroup_disabled() && memcg)
> > +               mod_memcg_state(memcg, idx, val);
>
> It's not safe to access @memcg throughout mod_memcg_state() for the
> kmem charged through objcg infrastructure. It's supposed to be safe
> to access @memcg under rcu read lock. Otherwise, it looks good to
> me.

Indeed you are right. v2 coming.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ