lkml.org 
[lkml]   [2022]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnet/9p/trans_fd.c:263:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
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

\
 
 \ /
  Last update: 2022-08-27 19:15    [W:0.048 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site