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 64C92C433EF for ; Thu, 24 Feb 2022 06:07:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3A0E8D0002; Thu, 24 Feb 2022 01:07:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EE8A38D0001; Thu, 24 Feb 2022 01:07:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD7838D0002; Thu, 24 Feb 2022 01:07:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id BA9278D0001 for ; Thu, 24 Feb 2022 01:07:09 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 62B4F229FF for ; Thu, 24 Feb 2022 06:07:09 +0000 (UTC) X-FDA: 79176640578.13.04D16FF Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf16.hostedemail.com (Postfix) with ESMTP id 394E6180003 for ; Thu, 24 Feb 2022 06:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645682828; x=1677218828; h=date:from:to:cc:subject:message-id:mime-version; bh=txeBw4hijIObZTOYRDFqf7XxiIrobjdSAlJo+PzB9eE=; b=ZNfCr8ukX5jVg5cLe4NeZHz26BSqwFBFJfZGwhhEwM0iUO1SJqpVvAZq sEeWq3qckmT1s2luwAXfFJCL+Zd3CEVIBhC1ypWfhfVOP6N9lEO7Koe0K Wa6P1TweMjUjfDRRHfvg8QnHKrUYY2CgCMsWmJwL06jHEo3grQNy78AFm EWD/b5JsDPjnWyrT5V/qV9HVPPTRu6sRnLfACAc95S6K/nZIqwEYYp2gR EKVRC/scBWTZostX6QmSNSE6qyM1aZfPCnCZLn+PY2N4R95SCm0xYgaDI sp5WoOksivwFOjfeQeMRk7wa3jT1x1kqFdTge7kqU3esR9vR5GLwwiRxU w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="232133885" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="232133885" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 22:07:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="574097155" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 23 Feb 2022 22:07:04 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nN7HM-0002Kd-1p; Thu, 24 Feb 2022 06:07:04 +0000 Date: Thu, 24 Feb 2022 14:06:32 +0800 From: kernel test robot To: "Liam R. Howlett" Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 6850/7915] mm/mmap.c:1991:25: error: passing argument 1 of 'vma_find' from incompatible pointer type Message-ID: <202202241403.qvb02FgB-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 394E6180003 X-Stat-Signature: gej9s9e76gx3xhdcneiwmkg3o6s1tsb3 Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ZNfCr8uk; spf=none (imf16.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.136) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-HE-Tag: 1645682827-37496 X-Bogosity: Ham, tests=bogofilter, 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/next/linux-next.git master head: d4a0ae62a277377de396850ed4b709b6bd9b7326 commit: b3d7ba3cdf23cae36715a695c7569f617e57d39d [6850/7915] mm: Remove the vma linked list config: parisc-randconfig-r015-20220223 (https://download.01.org/0day-ci/archive/20220224/202202241403.qvb02FgB-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b3d7ba3cdf23cae36715a695c7569f617e57d39d git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout b3d7ba3cdf23cae36715a695c7569f617e57d39d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): mm/mmap.c:515:6: warning: no previous prototype for 'vma_store' [-Wmissing-prototypes] 515 | void vma_store(struct mm_struct *mm, struct vm_area_struct *vma) | ^~~~~~~~~ mm/mmap.c: In function 'expand_upwards': >> mm/mmap.c:1991:25: error: passing argument 1 of 'vma_find' from incompatible pointer type [-Werror=incompatible-pointer-types] 1991 | next = vma_find(mm, vma->vm_end); | ^~ | | | struct mm_struct * In file included from arch/parisc/include/asm/cacheflush.h:5, from include/linux/cacheflush.h:5, from include/linux/highmem.h:8, from include/linux/bvec.h:10, from include/linux/blk_types.h:10, from include/linux/writeback.h:13, from include/linux/backing-dev.h:16, from mm/mmap.c:14: include/linux/mm.h:659:54: note: expected 'struct vma_iterator *' but argument is of type 'struct mm_struct *' 659 | struct vm_area_struct *vma_find(struct vma_iterator *vmi, unsigned long max) | ~~~~~~~~~~~~~~~~~~~~~^~~ cc1: some warnings being treated as errors vim +/vma_find +1991 mm/mmap.c 1962 1963 #if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64) 1964 /* 1965 * PA-RISC uses this for its stack; IA64 for its Register Backing Store. 1966 * vma is the last one with address > vma->vm_end. Have to extend vma. 1967 */ 1968 int expand_upwards(struct vm_area_struct *vma, unsigned long address) 1969 { 1970 struct mm_struct *mm = vma->vm_mm; 1971 struct vm_area_struct *next; 1972 unsigned long gap_addr; 1973 int error = 0; 1974 1975 if (!(vma->vm_flags & VM_GROWSUP)) 1976 return -EFAULT; 1977 1978 /* Guard against exceeding limits of the address space. */ 1979 address &= PAGE_MASK; 1980 if (address >= (TASK_SIZE & PAGE_MASK)) 1981 return -ENOMEM; 1982 address += PAGE_SIZE; 1983 1984 /* Enforce stack_guard_gap */ 1985 gap_addr = address + stack_guard_gap; 1986 1987 /* Guard against overflow */ 1988 if (gap_addr < address || gap_addr > TASK_SIZE) 1989 gap_addr = TASK_SIZE; 1990 > 1991 next = vma_find(mm, vma->vm_end); 1992 if (next && next->vm_start < gap_addr && vma_is_accessible(next)) { 1993 if (!(next->vm_flags & VM_GROWSUP)) 1994 return -ENOMEM; 1995 /* Check that both stack segments have the same anon_vma? */ 1996 } 1997 1998 /* We must make sure the anon_vma is allocated. */ 1999 if (unlikely(anon_vma_prepare(vma))) 2000 return -ENOMEM; 2001 2002 /* 2003 * vma->vm_start/vm_end cannot change under us because the caller 2004 * is required to hold the mmap_lock in read mode. We need the 2005 * anon_vma lock to serialize against concurrent expand_stacks. 2006 */ 2007 anon_vma_lock_write(vma->anon_vma); 2008 2009 /* Somebody else might have raced and expanded it already */ 2010 if (address > vma->vm_end) { 2011 unsigned long size, grow; 2012 2013 size = address - vma->vm_start; 2014 grow = (address - vma->vm_end) >> PAGE_SHIFT; 2015 2016 error = -ENOMEM; 2017 if (vma->vm_pgoff + (size >> PAGE_SHIFT) >= vma->vm_pgoff) { 2018 error = acct_stack_growth(vma, size, grow); 2019 if (!error) { 2020 /* 2021 * We only hold a shared mmap_lock lock here, so 2022 * we need to protect against concurrent vma 2023 * expansions. anon_vma_lock_write() doesn't 2024 * help here, as we don't guarantee that all 2025 * growable vmas in a mm share the same root 2026 * anon vma. So, we reuse mm->page_table_lock 2027 * to guard against concurrent vma expansions. 2028 */ 2029 spin_lock(&mm->page_table_lock); 2030 if (vma->vm_flags & VM_LOCKED) 2031 mm->locked_vm += grow; 2032 vm_stat_account(mm, vma->vm_flags, grow); 2033 anon_vma_interval_tree_pre_update_vma(vma); 2034 vma->vm_end = address; 2035 vma_store(mm, vma); 2036 anon_vma_interval_tree_post_update_vma(vma); 2037 spin_unlock(&mm->page_table_lock); 2038 2039 perf_event_mmap(vma); 2040 } 2041 } 2042 } 2043 anon_vma_unlock_write(vma->anon_vma); 2044 khugepaged_enter_vma_merge(vma, vma->vm_flags); 2045 return error; 2046 } 2047 #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ 2048 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org