[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y0DfbjPdpdECTHUT@monkey>
Date: Fri, 7 Oct 2022 19:24:46 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: kernel test robot <lkp@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: kbuild-all@...ts.01.org,
Linux Memory Management List <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Muchun Song <songmuchun@...edance.com>,
linux-kernel@...r.kernel.org
Subject: Re: [linux-next:master 12548/12775] mm/hugetlb.c:6835:6: sparse:
sparse: symbol '__hugetlb_vma_unlock_write_put' was not declared. Should it
be static?
On 10/08/22 05:00, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 082fce125e57cff60687181c97f3a8ee620c38f5
> commit: 95b61bfed8291e54f65e1fc836c5f9b49f74068c [12548/12775] hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer
> config: x86_64-randconfig-s022
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.4-39-gce1a6720-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=95b61bfed8291e54f65e1fc836c5f9b49f74068c
> 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 95b61bfed8291e54f65e1fc836c5f9b49f74068c
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@...el.com>
>
> sparse warnings: (new ones prefixed by >>)
> >> mm/hugetlb.c:6835:6: sparse: sparse: symbol '__hugetlb_vma_unlock_write_put' was not declared. Should it be static?
> mm/hugetlb.c:459:12: sparse: sparse: context imbalance in 'allocate_file_region_entries' - wrong count at exit
> mm/hugetlb.c:530:13: sparse: sparse: context imbalance in 'region_add' - wrong count at exit
> mm/hugetlb.c:597:13: sparse: sparse: context imbalance in 'region_chg' - wrong count at exit
> mm/hugetlb.c: note: in included file:
> include/linux/mm.h:1282:17: sparse: sparse: context imbalance in 'demote_free_huge_page' - unexpected unlock
> mm/hugetlb.c:4969:20: sparse: sparse: context imbalance in 'move_huge_pte' - different lock contexts for basic block
> mm/hugetlb.c:5340:17: sparse: sparse: context imbalance in 'hugetlb_wp' - unexpected unlock
> mm/hugetlb.c:6221:25: sparse: sparse: context imbalance in 'follow_hugetlb_page' - different lock contexts for basic block
Apologies for missing this in the previous fix!
>From cabb47237ecc48fceba767eee90f9b311876b329 Mon Sep 17 00:00:00 2001
From: Mike Kravetz <mike.kravetz@...cle.com>
Date: Fri, 7 Oct 2022 19:15:08 -0700
Subject: [PATCH] hugetlb: fix sparse warning for
__hugetlb_vma_unlock_write_put
Declare __hugetlb_vma_unlock_write_put as static.
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ac10d7d1a3ab..7cbe4f7c9baf 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6832,7 +6832,7 @@ void hugetlb_vma_lock_release(struct kref *kref)
kfree(vma_lock);
}
-void __hugetlb_vma_unlock_write_put(struct hugetlb_vma_lock *vma_lock)
+static void __hugetlb_vma_unlock_write_put(struct hugetlb_vma_lock *vma_lock)
{
struct vm_area_struct *vma = vma_lock->vma;
--
2.37.3
Powered by blists - more mailing lists