From: Mike Kravetz <mike.kravetz@oracle.com>
To: Kees Cook <keescook@chromium.org>, Mina Almasry <almasrymina@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <songmuchun@bytedance.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] hugetlb/cgroup: Fix copy/paste array assignment
Date: Fri, 3 Dec 2021 11:15:37 -0800 [thread overview]
Message-ID: <401d58c4-6ba8-b0c8-2ee6-0312fc6be57c@oracle.com> (raw)
In-Reply-To: <20211203065647.2819707-1-keescook@chromium.org>
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
next prev parent reply other threads:[~2021-12-03 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 6:56 Kees Cook
2021-12-03 7:43 ` Muchun Song
2021-12-03 19:15 ` Mike Kravetz [this message]
2021-12-07 1:54 ` Mina Almasry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=401d58c4-6ba8-b0c8-2ee6-0312fc6be57c@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox