* [akpm-mm:mm-new 291/296] include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers)
@ 2025-11-10 14:29 kernel test robot
2025-11-10 17:48 ` Lorenzo Stoakes
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-11-10 14:29 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head: 8017f1fc873a78f54df02521b4d150f7101916ae
commit: 85de428c7ca1b71457690b95e162662d0edb2792 [291/296] mm: set the VM_MAYBE_GUARD flag on guard region install
config: s390-randconfig-r131-20251110 (https://download.01.org/0day-ci/archive/20251110/202511102224.9qWchj6g-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/202511102224.9qWchj6g-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511102224.9qWchj6g-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
mm/khugepaged.c:830:25: sparse: sparse: symbol 'khugepaged_collapse_control' was not declared. Should it be static?
mm/khugepaged.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in '__collapse_huge_page_swapin' - unexpected unlock
mm/khugepaged.c:1196:26: sparse: sparse: context imbalance in 'collapse_huge_page' - different lock contexts for basic block
mm/khugepaged.c:1705:28: sparse: sparse: context imbalance in 'collapse_pte_mapped_thp' - unexpected unlock
mm/khugepaged.c: note: in included file:
>> include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected unsigned long const volatile *ptr @@ got unsigned long [noderef] * @@
include/linux/mm.h:957:24: sparse: expected unsigned long const volatile *ptr
include/linux/mm.h:957:24: sparse: got unsigned long [noderef] *
>> include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected unsigned long const volatile *addr @@ got unsigned long [noderef] * @@
include/linux/mm.h:957:24: sparse: expected unsigned long const volatile *addr
include/linux/mm.h:957:24: sparse: got unsigned long [noderef] *
mm/khugepaged.c:1822:28: sparse: sparse: context imbalance in 'retract_page_tables' - different lock contexts for basic block
vim +957 include/linux/mm.h
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 946
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 947 /*
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 948 * Test for VMA flag atomically. Requires no locks. Only specific valid flags
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 949 * are allowed to do this.
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 950 *
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 951 * This is necessarily racey, so callers must ensure that serialisation is
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 952 * achieved through some other means, or that races are permissible.
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 953 */
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 954 static inline bool vma_flag_test_atomic(struct vm_area_struct *vma, int bit)
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 955 {
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 956 if (__vma_flag_atomic_valid(vma, bit))
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 @957 return test_bit(bit, &vma->__vm_flags);
85de428c7ca1b71 Lorenzo Stoakes 2025-11-07 958
85de428c7ca1b71 Lorenzo Stoakes 2025-11-07 959 return false;
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 960 }
bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 961
:::::: The code at line 957 was first introduced by commit
:::::: bf91f4ed2a530f2e55e7b202c1692a4c682888d6 mm: add atomic VMA flags and set VM_MAYBE_GUARD as such
:::::: TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [akpm-mm:mm-new 291/296] include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers)
2025-11-10 14:29 [akpm-mm:mm-new 291/296] include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers) kernel test robot
@ 2025-11-10 17:48 ` Lorenzo Stoakes
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Stoakes @ 2025-11-10 17:48 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
On Mon, Nov 10, 2025 at 10:29:05PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head: 8017f1fc873a78f54df02521b4d150f7101916ae
> commit: 85de428c7ca1b71457690b95e162662d0edb2792 [291/296] mm: set the VM_MAYBE_GUARD flag on guard region install
> config: s390-randconfig-r131-20251110 (https://download.01.org/0day-ci/archive/20251110/202511102224.9qWchj6g-lkp@intel.com/config)
> compiler: s390-linux-gcc (GCC) 12.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/202511102224.9qWchj6g-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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202511102224.9qWchj6g-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected unsigned long const volatile *ptr @@ got unsigned long [noderef] * @@
Yeah my mistake this is the ACCESS_PRIVATE() stuff.
I'm not sure why it's not highlighting the vma_flags_set_atomic() stuff but
there we are :)
I'll fix this up.
>
> vim +957 include/linux/mm.h
>
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 946
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 947 /*
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 948 * Test for VMA flag atomically. Requires no locks. Only specific valid flags
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 949 * are allowed to do this.
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 950 *
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 951 * This is necessarily racey, so callers must ensure that serialisation is
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 952 * achieved through some other means, or that races are permissible.
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 953 */
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 954 static inline bool vma_flag_test_atomic(struct vm_area_struct *vma, int bit)
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 955 {
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 956 if (__vma_flag_atomic_valid(vma, bit))
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 @957 return test_bit(bit, &vma->__vm_flags);
> 85de428c7ca1b71 Lorenzo Stoakes 2025-11-07 958
> 85de428c7ca1b71 Lorenzo Stoakes 2025-11-07 959 return false;
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 960 }
> bf91f4ed2a530f2 Lorenzo Stoakes 2025-11-07 961
>
> :::::: The code at line 957 was first introduced by commit
> :::::: bf91f4ed2a530f2e55e7b202c1692a4c682888d6 mm: add atomic VMA flags and set VM_MAYBE_GUARD as such
>
> :::::: TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> :::::: CC: Andrew Morton <akpm@linux-foundation.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
Thanks, Lorenzo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-10 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-10 14:29 [akpm-mm:mm-new 291/296] include/linux/mm.h:957:24: sparse: sparse: incorrect type in argument 2 (different modifiers) kernel test robot
2025-11-10 17:48 ` Lorenzo Stoakes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox