From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DE97C0015E for ; Thu, 13 Jul 2023 21:37:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B27768D0006; Thu, 13 Jul 2023 17:37:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD7538D0002; Thu, 13 Jul 2023 17:37:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99F088D0006; Thu, 13 Jul 2023 17:37:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8BB198D0002 for ; Thu, 13 Jul 2023 17:37:16 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 56706403E5 for ; Thu, 13 Jul 2023 21:37:16 +0000 (UTC) X-FDA: 81007899672.04.7732A10 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf14.hostedemail.com (Postfix) with ESMTP id AF59F100017 for ; Thu, 13 Jul 2023 21:37:13 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jYEa96uo; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689284234; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=EyP2zjnMp0ZiOqkHC+PKqn964HzL2t91Kln1uTiySuE=; b=vqBtGfAO+RgXXp32eZ/6Sr7CmhxuDYoJjT7EQdibm49Lxst+tVfHbB17BaxHPbJl3PO4VA YsmFRB7OLw1ULiNv0itwlm9O/dY0UzYcFLTlgacQjygb/QCqoJIsBmQJPr8LoPweeYEVrs nMza3mlTUnlS5u8yJB5KflD3Tiv2aVo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689284234; a=rsa-sha256; cv=none; b=s7nP2xl3AoVL03zNFiMMGr6UswYZGMriEh5d5uVY4cLJ/9n2IthlEDxFJUCLtVKvNZNzvM rAbYHTMhR9phmPMh7icyDIN3g0JU83PAGQFdUJY50KIwdY0jvCIXwiP3xa+bqjbfFCtHNF GKHNvXY/pMux+L2LLmzwALQCEjM/ycE= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jYEa96uo; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689284233; x=1720820233; h=date:from:to:cc:subject:message-id:mime-version; bh=8s54Sz4oUPUOWK6tCLrDFwx2D1Iwc+CyAQxCia6EFt8=; b=jYEa96uoEvQ66MXHy5maMTcjzHp4YqlPmp4PuOHhonwxxqYZHd/0iWs2 Kc0fZ9xojydUJIGIjRpSADH3NGbElgOWmKkZQIF4+wcTpxUg2W+hYItqB 8WESh5M9F3F7aV8VR03rNN34jvdGi3KDReHCh0DieZo1HcnOscSlgoezM Zmi+Zxc4LeIGikPHTp+t0k6yYOLJeb5VW6PjLM4zwPuRjTVnSeO6d5x2L n+7WsqXNMerwdHBxVySaiK/hEueU8HNwXRjjUPrdduyz3cssVv2nRyBdb PSC+uBwhaJyYEyHRYqBIWJRbciJiLKmhvYlbA9wMStSFR8cwD8Iw2407V w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="396129902" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="396129902" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2023 14:37:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="835765472" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="835765472" Received: from lkp-server01.sh.intel.com (HELO c544d7fc5005) ([10.239.97.150]) by fmsmga002.fm.intel.com with ESMTP; 13 Jul 2023 14:37:10 -0700 Received: from kbuild by c544d7fc5005 with local (Exim 4.96) (envelope-from ) id 1qK3zp-0006uv-1B; Thu, 13 Jul 2023 21:37:09 +0000 Date: Fri, 14 Jul 2023 05:36:55 +0800 From: kernel test robot To: Mike Kravetz Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List Subject: [akpm-mm:mm-unstable 10/179] mm/hugetlb.c:1870:26: warning: variable 'folio' is uninitialized when used here Message-ID: <202307140551.1NHG7Haa-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: ks6zg53buc3nkg6bjporijawt3pu3smn X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: AF59F100017 X-Rspam-User: X-HE-Tag: 1689284233-243565 X-HE-Meta: U2FsdGVkX19qCUbyUzFuLP4yUjAzP1CA0OT96X9fFH5gK5TQMYvW0Mv08ksR3buGAThf0xdmteP70F0/ZRCd/H1n6NsW/atvoFw7K3yrk6xdeDvdcv9qkAkyJgnUaK/+fg4rXiC06apHz/huZDhMIEETRs4zLTThMOD8vdvkxZTgkKr1tqHRPxXYyqSow4BV2P06O1iK0nP1Rc6NTuc+WMiEwSJaDC3SC8r0j6vez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ogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: 20d834c03647d421114b4bee932993890042cd77 commit: 45f3e764da28d82646f485f8908528897af4fae6 [10/179] hugetlb: optimize update_and_free_pages_bulk to avoid lock cycles config: s390-randconfig-r034-20230713 (https://download.01.org/0day-ci/archive/20230714/202307140551.1NHG7Haa-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230714/202307140551.1NHG7Haa-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202307140551.1NHG7Haa-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) | ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' 102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) | ^ In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) | ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ >> mm/hugetlb.c:1870:26: warning: variable 'folio' is uninitialized when used here [-Wuninitialized] 1870 | add_hugetlb_folio(h, folio, true); | ^~~~~ mm/hugetlb.c:1857:21: note: initialize the variable 'folio' to silence this warning 1857 | struct folio *folio; | ^ | = NULL 13 warnings generated. vim +/folio +1870 mm/hugetlb.c 1853 1854 static void update_and_free_pages_bulk(struct hstate *h, struct list_head *list) 1855 { 1856 struct page *page, *t_page; 1857 struct folio *folio; 1858 bool clear_dtor = false; 1859 1860 /* 1861 * First allocate required vmemmmap for all pages on list. If vmemmap 1862 * can not be allocated, we can not free page to lower level allocator, 1863 * so add back as hugetlb surplus page. 1864 */ 1865 list_for_each_entry_safe(page, t_page, list, lru) { 1866 if (HPageVmemmapOptimized(page)) { 1867 clear_dtor = true; 1868 if (hugetlb_vmemmap_restore(h, page)) { 1869 spin_lock_irq(&hugetlb_lock); > 1870 add_hugetlb_folio(h, folio, true); 1871 spin_unlock_irq(&hugetlb_lock); 1872 } 1873 cond_resched(); 1874 } 1875 } 1876 1877 /* 1878 * If vmemmmap allocation performed above, then take lock * to clear 1879 * destructor of all pages on list. 1880 */ 1881 if (clear_dtor) { 1882 spin_lock_irq(&hugetlb_lock); 1883 list_for_each_entry(page, list, lru) 1884 __clear_hugetlb_destructor(h, page_folio(page)); 1885 spin_unlock_irq(&hugetlb_lock); 1886 } 1887 1888 /* 1889 * Free pages back to low level allocators. vmemmap and destructors 1890 * were taken care of above, so update_and_free_hugetlb_folio will 1891 * not need to take hugetlb lock. 1892 */ 1893 list_for_each_entry_safe(page, t_page, list, lru) { 1894 folio = page_folio(page); 1895 update_and_free_hugetlb_folio(h, folio, false); 1896 } 1897 } 1898 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki