All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: jasperwang@tencent.com, kaixuxia@tencent.com,
	frankjpliu@tencent.com, kasong@tencent.com,
	sagazchen@tencent.com, kernelxing@tencent.com,
	aurelianliu@tencent.com, jason.zeng@intel.com,
	wu.zheng@intel.com, yingbao.jia@intel.com, pei.p.jia@intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [opencloudos:linux-5.4/next 24605/27507] fs/ceph/mds_client.c:792:80: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 13 Mar 2024 17:50:36 +0800	[thread overview]
Message-ID: <202403131733.kh82730S-lkp@intel.com> (raw)

tree:   https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git linux-5.4/next
head:   fdd5d0bfc620bd5147ff5b260822c7645aeddad6
commit: 266b6cc05219d4424d5ae0d42beca427c560210c [24605/27507] ceph: add mds request pid info into debugfs
config: x86_64-randconfig-122-20240312 (https://download.01.org/0day-ci/archive/20240313/202403131733.kh82730S-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240313/202403131733.kh82730S-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/202403131733.kh82730S-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/ceph/mds_client.c:792:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *tsk @@     got struct task_struct [noderef] __rcu *parent @@
   fs/ceph/mds_client.c:792:80: sparse:     expected struct task_struct *tsk
   fs/ceph/mds_client.c:792:80: sparse:     got struct task_struct [noderef] __rcu *parent

vim +792 fs/ceph/mds_client.c

   760	
   761	/*
   762	 * Register an in-flight request, and assign a tid.  Link to directory
   763	 * are modifying (if any).
   764	 *
   765	 * Called under mdsc->mutex.
   766	 */
   767	static void __register_request(struct ceph_mds_client *mdsc,
   768				       struct ceph_mds_request *req,
   769				       struct inode *dir)
   770	{
   771		int ret = 0;
   772	
   773		req->r_tid = ++mdsc->last_tid;
   774		if (req->r_num_caps) {
   775			ret = ceph_reserve_caps(mdsc, &req->r_caps_reservation,
   776						req->r_num_caps);
   777			if (ret < 0) {
   778				pr_err("__register_request %p "
   779				       "failed to reserve caps: %d\n", req, ret);
   780				/* set req->r_err to fail early from __do_request */
   781				req->r_err = ret;
   782				return;
   783			}
   784		}
   785		dout("__register_request %p tid %lld\n", req, req->r_tid);
   786		ceph_mdsc_get_request(req);
   787		insert_request(&mdsc->request_tree, req);
   788	
   789		req->r_uid = current_fsuid();
   790		req->r_gid = current_fsgid();
   791		if (pid_alive(current)) {
 > 792			req->r_pid = task_pid_nr_ns(current, task_active_pid_ns(current->parent));
   793		} else {
   794			req->r_pid = -1;
   795		}
   796	
   797		if (mdsc->oldest_tid == 0 && req->r_op != CEPH_MDS_OP_SETFILELOCK)
   798			mdsc->oldest_tid = req->r_tid;
   799	
   800		if (dir) {
   801			ihold(dir);
   802			req->r_unsafe_dir = dir;
   803		}
   804	}
   805	

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

                 reply	other threads:[~2024-03-13  9:50 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=202403131733.kh82730S-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aurelianliu@tencent.com \
    --cc=frankjpliu@tencent.com \
    --cc=jason.zeng@intel.com \
    --cc=jasperwang@tencent.com \
    --cc=kaixuxia@tencent.com \
    --cc=kasong@tencent.com \
    --cc=kernelxing@tencent.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pei.p.jia@intel.com \
    --cc=sagazchen@tencent.com \
    --cc=wu.zheng@intel.com \
    --cc=yingbao.jia@intel.com \
    /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.