* [davidhildenbrand:mm_id_6.14 5/13] mm/page_alloc.c:976:20: warning: this statement may fall through
@ 2025-02-16 14:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-16 14:19 UTC (permalink / raw)
To: David Hildenbrand; +Cc: oe-kbuild-all
tree: https://github.com/davidhildenbrand/linux mm_id_6.14
head: dcbc194183fd7526f260cc629aabff9d3300083e
commit: c599962b8dd50874ba583ccb6eb6cd9d2e973d45 [5/13] mm: move hugetlb specific things in folio to page[3]
config: riscv-randconfig-002-20250216 (https://download.01.org/0day-ci/archive/20250216/202502162207.5aJRjcne-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250216/202502162207.5aJRjcne-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502162207.5aJRjcne-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/page_alloc.c: In function 'free_tail_page_prepare':
>> mm/page_alloc.c:976:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
976 | if (IS_ENABLED(CONFIG_HUGETLB_PAGE))
| ^
mm/page_alloc.c:978:9: note: here
978 | default:
| ^~~~~~~
vim +976 mm/page_alloc.c
931
932 static int free_tail_page_prepare(struct page *head_page, struct page *page)
933 {
934 struct folio *folio = (struct folio *)head_page;
935 int ret = 1;
936
937 /*
938 * We rely page->lru.next never has bit 0 set, unless the page
939 * is PageTail(). Let's make sure that's true even for poisoned ->lru.
940 */
941 BUILD_BUG_ON((unsigned long)LIST_POISON1 & 1);
942
943 if (!is_check_pages_enabled()) {
944 ret = 0;
945 goto out;
946 }
947 switch (page - head_page) {
948 case 1:
949 /* the first tail page: these may be in place of ->mapping */
950 if (unlikely(folio_entire_mapcount(folio))) {
951 bad_page(page, "nonzero entire_mapcount");
952 goto out;
953 }
954 if (unlikely(folio_large_mapcount(folio))) {
955 bad_page(page, "nonzero large_mapcount");
956 goto out;
957 }
958 if (unlikely(atomic_read(&folio->_nr_pages_mapped))) {
959 bad_page(page, "nonzero nr_pages_mapped");
960 goto out;
961 }
962 if (unlikely(atomic_read(&folio->_pincount))) {
963 bad_page(page, "nonzero pincount");
964 goto out;
965 }
966 break;
967 case 2:
968 /* the second tail page: deferred_list overlaps ->mapping */
969 if (unlikely(!list_empty(&folio->_deferred_list))) {
970 bad_page(page, "on deferred list");
971 goto out;
972 }
973 break;
974 case 3:
975 /* the third tail page: hugetlb specifics overlaps ->mappings */
> 976 if (IS_ENABLED(CONFIG_HUGETLB_PAGE))
977 break;
978 default:
979 if (page->mapping != TAIL_MAPPING) {
980 bad_page(page, "corrupted mapping in tail page");
981 goto out;
982 }
983 break;
984 }
985 if (unlikely(!PageTail(page))) {
986 bad_page(page, "PageTail not set");
987 goto out;
988 }
989 if (unlikely(compound_head(page) != head_page)) {
990 bad_page(page, "compound_head not consistent");
991 goto out;
992 }
993 ret = 0;
994 out:
995 page->mapping = NULL;
996 clear_compound_head(page);
997 return ret;
998 }
999
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-16 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 14:19 [davidhildenbrand:mm_id_6.14 5/13] mm/page_alloc.c:976:20: warning: this statement may fall through kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.