From: Mike Kravetz <mike.kravetz@oracle.com>
To: kernel test robot <lkp@intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <songmuchun@bytedance.com>,
linux-kernel@vger.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?
Date: Fri, 7 Oct 2022 19:24:46 -0700 [thread overview]
Message-ID: <Y0DfbjPdpdECTHUT@monkey> (raw)
In-Reply-To: <202210080448.1cB176kW-lkp@intel.com>
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@intel.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@oracle.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@intel.com>
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.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
next prev parent reply other threads:[~2022-10-08 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 21:00 [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? kernel test robot
2022-10-08 2:24 ` Mike Kravetz [this message]
2022-10-08 3:22 ` Muchun Song
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=Y0DfbjPdpdECTHUT@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=songmuchun@bytedance.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).