From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:mm_id_6.14 5/13] mm/page_alloc.c:976:20: warning: this statement may fall through
Date: Sun, 16 Feb 2025 22:19:23 +0800 [thread overview]
Message-ID: <202502162207.5aJRjcne-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-16 14:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502162207.5aJRjcne-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.