Messages in this thread | | | From | Joonsoo Kim <> | Date | Fri, 22 May 2020 16:42:54 +0900 | Subject | Re: [PATCH 06/11] mm/hugetlb: do not modify user provided gfp_mask |
| |
2020년 5월 22일 (금) 오전 7:19, Mike Kravetz <mike.kravetz@oracle.com>님이 작성: > > On 5/17/20 6:20 PM, js1304@gmail.com wrote: > > From: Joonsoo Kim <iamjoonsoo.kim@lge.com> > > > > It's not good practice to modify user input. Instead of using it to > > build correct gfp_mask for APIs, this patch introduces another gfp_mask > > field, __gfp_mask, for internal usage. > > Modifying the flags as is done in the existing code does not bother me > too much, but that is just my opinion. Adding __gfp_mask for modifications > is fine with me if others think it is a good thing.
With the following patches, in some cases, ac->gfp_mask is set up once and used many times. If we modify ac->gfp_mask in place, there would be side-effect.
> Does dequeue_huge_page_vma() need to be modified so that it will set > ac.__gfp_mask before calling dequeue_huge_page_nodemask()?
Good catch! Will change!
Thanks.
| |