All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [koverstreet-bcachefs:bcachefs-testing 11/101] fs/bcachefs/vfs/ioctl.c:907:27: sparse: sparse: cast to non-scalar
Date: Sat, 16 May 2026 07:59:13 +0800	[thread overview]
Message-ID: <202605160707.JD8cgCci-lkp@intel.com> (raw)

tree:   https://github.com/koverstreet/bcachefs bcachefs-testing
head:   ca944a61e079450f82be88c91e349638c75cf4b6
commit: 39fe245ff806f1dcf1d02b034d35df86b8944ec2 [11/101] bcachefs: wire up error reporting in pread_raw ioctl
config: sh-randconfig-r123-20260514 (https://download.01.org/0day-ci/archive/20260516/202605160707.JD8cgCci-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260516/202605160707.JD8cgCci-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/202605160707.JD8cgCci-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/bcachefs/vfs/ioctl.c:907:27: sparse: sparse: cast to non-scalar
>> fs/bcachefs/vfs/ioctl.c:907:27: sparse: sparse: cast from non-scalar

vim +907 fs/bcachefs/vfs/ioctl.c

   868	
   869	static long bch2_ioc_pread_raw(struct file *file,
   870				       struct bch_inode_info *inode,
   871				       struct bch_ioctl_pread_raw __user *uarg)
   872	{
   873		struct bch_ioctl_pread_raw arg;
   874	
   875		if (copy_from_user(&arg, uarg, sizeof(arg)))
   876			return -EFAULT;
   877		if (arg.flags & ~BCH_PREAD_RAW_no_poison_check)
   878			return -EINVAL;
   879		if (arg.err.pad)
   880			return -EINVAL;
   881		if (!arg.len)
   882			return 0;
   883		if (!(file->f_flags & O_DIRECT))
   884			return -EINVAL;
   885		if (!inode_owner_or_capable(file_mnt_idmap(file), &inode->v))
   886			return -EPERM;
   887	
   888		loff_t pos = arg.offset;
   889		int ret = rw_verify_area(READ, file, &pos, arg.len);
   890		if (ret)
   891			return ret;
   892	
   893		struct iov_iter iter;
   894		import_ubuf(ITER_DEST, (void __user *)(unsigned long)arg.buf, arg.len, &iter);
   895	
   896		struct kiocb kiocb;
   897		init_sync_kiocb(&kiocb, file);
   898		kiocb.ki_pos = arg.offset;
   899	
   900		enum bch_read_flags read_flags = 0;
   901		if (arg.flags & BCH_PREAD_RAW_no_poison_check)
   902			read_flags |= BCH_READ_no_poison_check;
   903	
   904		struct bch_read_err_report err_report;
   905		mutex_init(&err_report.lock);
   906		err_report.errors = 0;
 > 907		err_report.msg = (struct printbuf) PRINTBUF;
   908	
   909		ret = bch2_direct_IO_read(&kiocb, &iter, read_flags, &err_report);
   910	
   911		if (copy_to_user(&uarg->errors, &err_report.errors, sizeof(err_report.errors)))
   912			ret = -EFAULT;
   913	
   914		int err = bch2_copy_ioctl_err_msg(&arg.err, &err_report.msg, ret < 0 ? ret : 0);
   915		if (err && !ret)
   916			ret = err;
   917	
   918		printbuf_exit(&err_report.msg);
   919		return ret;
   920	}
   921	

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

                 reply	other threads:[~2026-05-15 23:59 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=202605160707.JD8cgCci-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kent.overstreet@linux.dev \
    --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 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.