lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] mm/memcg: rename mem_cgroup_split_huge_fixup to split_page_memcg
On Tue 09-03-21 09:37:29, Balbir Singh wrote:
> On 4/3/21 6:40 pm, Zhou Guanghui wrote:
[...]
> > -#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> > /*
> > - * Because page_memcg(head) is not set on compound tails, set it now.
> > + * Because page_memcg(head) is not set on tails, set it now.
> > */
> > -void mem_cgroup_split_huge_fixup(struct page *head)
> > +void split_page_memcg(struct page *head, unsigned int nr)
> > {
>
> Do we need input validation on nr? Can nr be aribtrary or can we enforce
>
> VM_BUG_ON(!is_power_of_2(nr));

In practice this will be power of 2 but why should we bother to sanitze
that?

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2021-03-09 09:30    [W:0.131 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site