[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <401d58c4-6ba8-b0c8-2ee6-0312fc6be57c@oracle.com>
Date: Fri, 3 Dec 2021 11:15:37 -0800
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Kees Cook <keescook@...omium.org>,
Mina Almasry <almasrymina@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <songmuchun@...edance.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] hugetlb/cgroup: Fix copy/paste array assignment
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@...omium.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
Powered by blists - more mailing lists