mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	0day robot <lkp@intel.com>
Subject: net/9p/trans_fd.c:263:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sun, 28 Aug 2022 01:14:40 +0800	[thread overview]
Message-ID: <202208280102.vCNrXRCa-lkp@intel.com> (raw)

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220827-141406/Tetsuo-Handa/9p-trans_fd-always-use-O_NONBLOCK-read-write/20220826-233109
head:   a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
commit: a1740a60720018fa78f0cfe45db5cfc85e2d3a6d 9p/trans_fd: perform read/write with TIF_SIGPENDING set
date:   11 hours ago
config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220828/202208280102.vCNrXRCa-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review UPDATE-20220827-141406/Tetsuo-Handa/9p-trans_fd-always-use-O_NONBLOCK-read-write/20220826-233109
        git checkout a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/9p/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> net/9p/trans_fd.c:263:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:263:31: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:263:31: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:265:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:265:33: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:265:33: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:431:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:431:31: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:431:31: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:433:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:433:33: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:433:33: sparse:     got struct spinlock [noderef] __rcu *

vim +263 net/9p/trans_fd.c

   238	
   239	/**
   240	 * p9_fd_read- read from a fd
   241	 * @client: client instance
   242	 * @v: buffer to receive data into
   243	 * @len: size of receive buffer
   244	 *
   245	 */
   246	
   247	static int p9_fd_read(struct p9_client *client, void *v, int len)
   248	{
   249		int ret;
   250		struct p9_trans_fd *ts = NULL;
   251		loff_t pos;
   252	
   253		if (client && client->status != Disconnected)
   254			ts = client->trans;
   255	
   256		if (!ts)
   257			return -EREMOTEIO;
   258	
   259		pos = ts->rd->f_pos;
   260		/* Force non-blocking read() even without O_NONBLOCK. */
   261		set_thread_flag(TIF_SIGPENDING);
   262		ret = kernel_read(ts->rd, v, len, &pos);
 > 263		spin_lock_irq(&current->sighand->siglock);
   264		recalc_sigpending();
   265		spin_unlock_irq(&current->sighand->siglock);
   266		if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN)
   267			client->status = Disconnected;
   268		return ret;
   269	}
   270	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-27 17:15 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=202208280102.vCNrXRCa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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

all inboxes | Powered by JetHome®