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] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf76a8df-33f5-4667-aa90-edd9f26b6cf7@linux.dev>
Date: Sat, 28 Sep 2024 13:39:51 +0800
From: Chengming Zhou <chengming.zhou@...ux.dev>
To: Kanchana P Sridhar <kanchana.p.sridhar@...el.com>,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org, hannes@...xchg.org,
 yosryahmed@...gle.com, nphamcs@...il.com, usamaarif642@...il.com,
 shakeel.butt@...ux.dev, ryan.roberts@....com, ying.huang@...el.com,
 21cnbao@...il.com, akpm@...ux-foundation.org
Cc: nanhai.zou@...el.com, wajdi.k.feghali@...el.com, vinodh.gopal@...el.com
Subject: Re: [PATCH v8 1/8] mm: Define obj_cgroup_get() if CONFIG_MEMCG is not
 defined.

On 2024/9/28 10:16, Kanchana P Sridhar wrote:
> This resolves an issue with obj_cgroup_get() not being defined if
> CONFIG_MEMCG is not defined.
> 
> Before this patch, we would see build errors if obj_cgroup_get() is
> called from code that is agnostic of CONFIG_MEMCG.
> 
> The zswap_store() changes for large folios in subsequent commits will
> require the use of obj_cgroup_get() in zswap code that falls into this
> category.
> 
> Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@...el.com>
> Reviewed-by: Nhat Pham <nphamcs@...il.com>

Reviewed-by: Chengming Zhou <chengming.zhou@...ux.dev>

> ---
>   include/linux/memcontrol.h | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 34d2da05f2f1..15c2716f9aa3 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -1282,6 +1282,10 @@ struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *css)
>   	return NULL;
>   }
>   
> +static inline void obj_cgroup_get(struct obj_cgroup *objcg)
> +{
> +}
> +
>   static inline void obj_cgroup_put(struct obj_cgroup *objcg)
>   {
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ