lkml.org 
[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] hugetlb/cgroup: Fix copy/paste array assignment
From
On 12/2/21 22:56, Kees Cook wrote:
> Fix mismatched array assignment, reported by an -Warray-bounds build:
>
> mm/hugetlb_cgroup.c: In function '__hugetlb_cgroup_file_legacy_init':
> mm/hugetlb_cgroup.c:850:35: error: array subscript 8 is above array bounds of 'struct cftype[8]' [-Werror=array-bounds ]
> 850 | cft = &h->cgroup_files_dfl[8];
> | ~~~~~~~~~~~~~~~~~~~^~~
> In file included from mm/hugetlb_cgroup.c:23:
> ./include/linux/hugetlb.h:625:23: note: while referencing 'cgroup_files_dfl'
> 625 | struct cftype cgroup_files_dfl[8];
> | ^~~~~~~~~~~~~~~~
>
> Fixes: e45f4726bcad ("hugetlb: add hugetlb.*.numa_stat file")
> Signed-off-by: Kees Cook <keescook@chromium.org>

Thank you Kees (and Muchun)!

I believe this is just in Andrew's tree and as a result linux-next right now.
Perhaps Andrew can just squash this and ("hugetlb: Fix spelling mistake
"hierarichal" -> "hierarchical"") with the original?

The Fixes hash will change.
--
Mike Kravetz

\
 
 \ /
  Last update: 2021-12-03 20:16    [W:0.061 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site