From: Lorenzo Stoakes <ljs@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: mm/mprotect.c:700:43: sparse: sparse: cast to non-scalar
Date: Mon, 22 Jun 2026 14:51:56 +0100 [thread overview]
Message-ID: <ajk9RsbGcMjFIpxL@lucifer> (raw)
In-Reply-To: <202606221720.CGRCyQ8e-lkp@intel.com>
On Mon, Jun 22, 2026 at 06:02:20PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ef0c9f75a19532d7675384708fc8621e10850104
> commit: 3a6455d56bd7c4cfb1ea35ddae052943065e338e mm: convert do_brk_flags() to use vma_flags_t
> date: 3 months ago
> config: alpha-randconfig-r111-20260618 (https://download.01.org/0day-ci/archive/20260622/202606221720.CGRCyQ8e-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 10.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260622/202606221720.CGRCyQ8e-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
> | Fixes: 3a6455d56bd7 ("mm: convert do_brk_flags() to use vma_flags_t")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202606221720.CGRCyQ8e-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> mm/mprotect.c:700:43: sparse: sparse: cast to non-scalar
> >> mm/mprotect.c:700:43: sparse: sparse: cast from non-scalar
> mm/mprotect.c: note: in included file (through include/linux/mm.h, include/linux/pagewalk.h):
> include/linux/pgtable.h:461:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast from non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast from non-scalar
> mm/mprotect.c: note: in included file (through include/linux/pgtable.h, include/linux/mm.h, include/linux/pagewalk.h):
> arch/alpha/include/asm/pgtable.h:272:21: sparse: sparse: cast to non-scalar
> arch/alpha/include/asm/pgtable.h:272:21: sparse: sparse: cast from non-scalar
> arch/alpha/include/asm/pgtable.h:272:21: sparse: sparse: cast to non-scalar
> arch/alpha/include/asm/pgtable.h:272:21: sparse: sparse: cast from non-scalar
> mm/mprotect.c: note: in included file (through include/linux/mm.h, include/linux/pagewalk.h):
> include/linux/pgtable.h:475:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:475:16: sparse: sparse: cast from non-scalar
> include/linux/pgtable.h:468:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:468:16: sparse: sparse: cast from non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast from non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast to non-scalar
> include/linux/pgtable.h:461:16: sparse: sparse: cast from non-scalar
>
> vim +700 mm/mprotect.c
>
> 693
> 694 int
> 695 mprotect_fixup(struct vma_iterator *vmi, struct mmu_gather *tlb,
> 696 struct vm_area_struct *vma, struct vm_area_struct **pprev,
> 697 unsigned long start, unsigned long end, vm_flags_t newflags)
> 698 {
> 699 struct mm_struct *mm = vma->vm_mm;
> > 700 const vma_flags_t old_vma_flags = READ_ONCE(vma->flags);
Ah yeah... this works right now but is actually sketchy, as we need to copy not assign.
Will come up with a fix for this, but I think it needn't be backported as this
all works correctly right now.
Thanks, Lorenzo
next prev parent reply other threads:[~2026-06-22 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 10:02 mm/mprotect.c:700:43: sparse: sparse: cast to non-scalar kernel test robot
2026-06-22 13:51 ` Lorenzo Stoakes [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-16 4:25 kernel test robot
2026-05-22 14:29 ` Lorenzo Stoakes
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=ajk9RsbGcMjFIpxL@lucifer \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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