All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: fs/fuse/ext_map.c:28:51: sparse: sparse: Initializer entry defined twice
Date: Fri, 04 Dec 2026 01:07:08 +0100	[thread overview]
Message-ID: <20261204010408.PHf1ZlAM-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "sparse: Initializer entry defined twice"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Miklos Szeredi <mszeredi@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   007722b8211f7b34fdf21b1e6a9c32497633ea29
commit: bf75733445820e511ca0b9158a639f6c255eaf7d fuse: add extent map data structure
date:   6 weeks ago
:::::: branch date: 7 hours ago
:::::: commit date: 6 weeks ago
config: s390-randconfig-r2304-20261203 (https://download.01.org/0day-ci/archive/20261204/20261204010408.PHf1ZlAM-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project c81a35549c5c976f799dc394e6eaf41da1ff2f64)
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204010408.PHf1ZlAM-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: bf7573344582 ("fuse: add extent map data structure")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261204010408.PHf1ZlAM-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/fuse/ext_map.c:28:51: sparse: sparse: Initializer entry defined twice
   fs/fuse/ext_map.c:28:51: sparse:   also defined here
   fs/fuse/ext_map.c:103:22: sparse: sparse: Initializer entry defined twice
   fs/fuse/ext_map.c:103:22: sparse:   also defined here

vim +28 fs/fuse/ext_map.c

bf75733445820e Miklos Szeredi 2026-09-21  24  
bf75733445820e Miklos Szeredi 2026-09-21  25  static int fuse_add_extent(struct fuse_conn *fc, struct rb_root *extents,
bf75733445820e Miklos Szeredi 2026-09-21  26  			   struct fuse_extent *ext)
bf75733445820e Miklos Szeredi 2026-09-21  27  {
bf75733445820e Miklos Szeredi 2026-09-21 @28  	struct fuse_iext *new_fie __free(kfree) = kzalloc_obj(*new_fie);
bf75733445820e Miklos Szeredi 2026-09-21  29  	struct rb_node *parent = NULL, **link = &extents->rb_node;
bf75733445820e Miklos Szeredi 2026-09-21  30  	loff_t end;
bf75733445820e Miklos Szeredi 2026-09-21  31  	u64 tmp;
bf75733445820e Miklos Szeredi 2026-09-21  32  
bf75733445820e Miklos Szeredi 2026-09-21  33  	if (!new_fie)
bf75733445820e Miklos Szeredi 2026-09-21  34  		return -ENOMEM;
bf75733445820e Miklos Szeredi 2026-09-21  35  
bf75733445820e Miklos Szeredi 2026-09-21  36  	if (ext->reserved[0] || ext->reserved[1])
bf75733445820e Miklos Szeredi 2026-09-21  37  		return fuse_EIO("reserved fields set");
bf75733445820e Miklos Szeredi 2026-09-21  38  
bf75733445820e Miklos Szeredi 2026-09-21  39  	if (!PAGE_ALIGNED(ext->offset) || !PAGE_ALIGNED(ext->length) || !PAGE_ALIGNED(ext->addr))
bf75733445820e Miklos Szeredi 2026-09-21  40  		return fuse_EIO("not page aligned");
bf75733445820e Miklos Szeredi 2026-09-21  41  
bf75733445820e Miklos Szeredi 2026-09-21  42  	if (!ext->length)
bf75733445820e Miklos Szeredi 2026-09-21  43  		return fuse_EIO("zero sized extent");
bf75733445820e Miklos Szeredi 2026-09-21  44  
bf75733445820e Miklos Szeredi 2026-09-21  45  	if (overflows_type(ext->offset, loff_t) ||
bf75733445820e Miklos Szeredi 2026-09-21  46  	    check_add_overflow(ext->offset, ext->length, &end) ||
bf75733445820e Miklos Szeredi 2026-09-21  47  	    check_add_overflow(ext->addr, ext->length, &tmp))
bf75733445820e Miklos Szeredi 2026-09-21  48  		return fuse_EIO("offset overflow");
bf75733445820e Miklos Szeredi 2026-09-21  49  
bf75733445820e Miklos Szeredi 2026-09-21  50  	new_fie->start = ext->offset;
bf75733445820e Miklos Szeredi 2026-09-21  51  	new_fie->end = end;
bf75733445820e Miklos Szeredi 2026-09-21  52  	new_fie->backing_offset = ext->addr;
bf75733445820e Miklos Szeredi 2026-09-21  53  
bf75733445820e Miklos Szeredi 2026-09-21  54  	while (*link) {
bf75733445820e Miklos Szeredi 2026-09-21  55  		struct fuse_iext *fie = rb_entry(*link, typeof(*fie), rb);
bf75733445820e Miklos Szeredi 2026-09-21  56  
bf75733445820e Miklos Szeredi 2026-09-21  57  		parent = *link;
bf75733445820e Miklos Szeredi 2026-09-21  58  		if (new_fie->end <= fie->start)
bf75733445820e Miklos Szeredi 2026-09-21  59  			link = &parent->rb_left;
bf75733445820e Miklos Szeredi 2026-09-21  60  		else if (new_fie->start >= fie->end)
bf75733445820e Miklos Szeredi 2026-09-21  61  			link = &parent->rb_right;
bf75733445820e Miklos Szeredi 2026-09-21  62  		else
bf75733445820e Miklos Szeredi 2026-09-21  63  			return fuse_EIO("overlap");
bf75733445820e Miklos Szeredi 2026-09-21  64  	}
bf75733445820e Miklos Szeredi 2026-09-21  65  
bf75733445820e Miklos Szeredi 2026-09-21  66  	new_fie->backing = fuse_backing_lookup(fc, ext->backing_id);
bf75733445820e Miklos Szeredi 2026-09-21  67  	if (!new_fie->backing)
bf75733445820e Miklos Szeredi 2026-09-21  68  		return fuse_EIO("backing not found");
bf75733445820e Miklos Szeredi 2026-09-21  69  
bf75733445820e Miklos Szeredi 2026-09-21  70  	if (new_fie->backing->type != FUSE_BACKING_DAXDEV) {
bf75733445820e Miklos Szeredi 2026-09-21  71  		fuse_backing_put(new_fie->backing);
bf75733445820e Miklos Szeredi 2026-09-21  72  		return fuse_EIO("backing is not dax device");
bf75733445820e Miklos Szeredi 2026-09-21  73  	}
bf75733445820e Miklos Szeredi 2026-09-21  74  
bf75733445820e Miklos Szeredi 2026-09-21  75  	rb_link_node(&new_fie->rb, parent, link);
bf75733445820e Miklos Szeredi 2026-09-21  76  	rb_insert_color(&no_free_ptr(new_fie)->rb, extents);
bf75733445820e Miklos Szeredi 2026-09-21  77  
bf75733445820e Miklos Szeredi 2026-09-21  78  	return 0;
bf75733445820e Miklos Szeredi 2026-09-21  79  }
bf75733445820e Miklos Szeredi 2026-09-21  80  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-12-04  0:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261204010408.PHf1ZlAM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.