lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 8 Oct 2022 11:22:35 +0800
From:   Muchun Song <muchun.song@...ux.dev>
To:     Mike Kravetz <mike.kravetz@...cle.com>
Cc:     kernel test robot <lkp@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        kbuild-all@...ts.01.org,
        Linux Memory Management List <linux-mm@...ck.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 Oct 8, 2022, at 10:24, Mike Kravetz <mike.kravetz@...cle.com> wrote:
> 
> 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>

Reviewed-by: Muchun Song <songmuchun@...edance.com>

Thanks.

Powered by blists - more mailing lists