mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [folded-merged] hugetlb-add-hugetlbnuma_stat-file-fix-2.patch removed from -mm tree
@ 2022-01-14 21:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2022-01-14 21:30 UTC (permalink / raw)
  To: almasrymina, keescook, mike.kravetz, mm-commits, sfr, songmuchun


The patch titled
     Subject: hugetlb/cgroup: fix copy/paste array assignment
has been removed from the -mm tree.  Its filename was
     hugetlb-add-hugetlbnuma_stat-file-fix-2.patch

This patch was dropped because it was folded into hugetlb-add-hugetlbnuma_stat-file.patch

------------------------------------------------------
From: Kees Cook <keescook@chromium.org>
Subject: hugetlb/cgroup: fix copy/paste array assignment

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];
      |                       ^~~~~~~~~~~~~~~~

Link: https://lkml.kernel.org/r/20211203065647.2819707-1-keescook@chromium.org
Fixes: e45f4726bcad ("hugetlb: add hugetlb.*.numa_stat file")
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb_cgroup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/hugetlb_cgroup.c~hugetlb-add-hugetlbnuma_stat-file-fix-2
+++ a/mm/hugetlb_cgroup.c
@@ -847,7 +847,7 @@ static void __init __hugetlb_cgroup_file
 	cft->read_u64 = hugetlb_cgroup_read_u64;
 
 	/* Add the numa stat file */
-	cft = &h->cgroup_files_dfl[8];
+	cft = &h->cgroup_files_legacy[8];
 	snprintf(cft->name, MAX_CFTYPE_NAME, "%s.numa_stat", buf);
 	cft->private = MEMFILE_PRIVATE(idx, 1);
 	cft->seq_show = hugetlb_cgroup_read_numa_stat;
_

Patches currently in -mm which might be from keescook@chromium.org are

hugetlb-add-hugetlbnuma_stat-file.patch
hfsplus-use-struct_group_attr-for-memcpy-region.patch
ubsan-remove-config_ubsan_object_size.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-14 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 21:30 [folded-merged] hugetlb-add-hugetlbnuma_stat-file-fix-2.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).