[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202005281500.16HgHvDn%lkp@intel.com>
Date: Thu, 28 May 2020 15:48:05 +0800
From: kbuild test robot <lkp@...el.com>
To: Jan Kara <jack@...e.cz>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
Ming Lei <ming.lei@...hat.com>,
Bart Van Assche <bvanassche@....org>
Subject: kernel/trace/blktrace.c:347:12: sparse: sparse: incorrect type in
assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: c780e86dd48ef6467a1146cf7d0fe1e05a635039 blktrace: Protect q->blk_trace with RCU
date: 3 months ago
config: x86_64-randconfig-s021-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
git checkout c780e86dd48ef6467a1146cf7d0fe1e05a635039
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/blktrace.c:347:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct blk_trace *bt @@ got struct blk_trace [noderef] <asn:4> *[assigned] __ret @@
kernel/trace/blktrace.c:347:12: sparse: expected struct blk_trace *bt
kernel/trace/blktrace.c:347:12: sparse: got struct blk_trace [noderef] <asn:4> *[assigned] __ret
>> kernel/trace/blktrace.c:547:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct blk_trace [noderef] <asn:4> *__new @@ got struct blk_trace *[assigned] bt @@
kernel/trace/blktrace.c:547:13: sparse: expected struct blk_trace [noderef] <asn:4> *__new
kernel/trace/blktrace.c:547:13: sparse: got struct blk_trace *[assigned] bt
kernel/trace/blktrace.c:998:50: sparse: sparse: incorrect type in argument 7 (different base types) @@ expected int error @@ got restricted blk_status_t [usertype] bi_status @@
kernel/trace/blktrace.c:998:50: sparse: expected int error
kernel/trace/blktrace.c:998:50: sparse: got restricted blk_status_t [usertype] bi_status
kernel/trace/blktrace.c:1036:68: sparse: sparse: incorrect type in argument 7 (different base types) @@ expected int error @@ got restricted blk_status_t [usertype] bi_status @@
kernel/trace/blktrace.c:1036:68: sparse: expected int error
kernel/trace/blktrace.c:1036:68: sparse: got restricted blk_status_t [usertype] bi_status
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1257:16: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1264:32: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long long [usertype] sector_from @@ got restricted __be64 const [usertype] sector_from @@
kernel/trace/blktrace.c:1264:32: sparse: expected unsigned long long [usertype] sector_from
kernel/trace/blktrace.c:1264:32: sparse: got restricted __be64 const [usertype] sector_from
kernel/trace/blktrace.c:1266:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] device_from @@ got unsigned int @@
kernel/trace/blktrace.c:1266:24: sparse: expected restricted __be32 [usertype] device_from
kernel/trace/blktrace.c:1266:24: sparse: got unsigned int
kernel/trace/blktrace.c:1267:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] device_to @@ got unsigned int @@
kernel/trace/blktrace.c:1267:24: sparse: expected restricted __be32 [usertype] device_to
kernel/trace/blktrace.c:1267:24: sparse: got unsigned int
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:26: sparse: sparse: cast to restricted __be64
kernel/trace/blktrace.c:1268:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be64 [usertype] sector_from @@ got unsigned long long @@
kernel/trace/blktrace.c:1268:24: sparse: expected restricted __be64 [usertype] sector_from
kernel/trace/blktrace.c:1268:24: sparse: got unsigned long long
kernel/trace/blktrace.c:1415:26: sparse: sparse: restricted __be32 degrades to integer
kernel/trace/blktrace.c:1415:48: sparse: sparse: restricted __be32 degrades to integer
kernel/trace/blktrace.c:1416:27: sparse: sparse: cast from restricted __be64
kernel/trace/blktrace.c:1640:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct blk_trace *bt @@ got struct blk_trace [noderef] <asn:4> *[assigned] __ret @@
kernel/trace/blktrace.c:1640:12: sparse: expected struct blk_trace *bt
kernel/trace/blktrace.c:1640:12: sparse: got struct blk_trace [noderef] <asn:4> *[assigned] __ret
kernel/trace/blktrace.c:1673:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct blk_trace [noderef] <asn:4> *__new @@ got struct blk_trace *[assigned] bt @@
kernel/trace/blktrace.c:1673:13: sparse: expected struct blk_trace [noderef] <asn:4> *__new
kernel/trace/blktrace.c:1673:13: sparse: got struct blk_trace *[assigned] bt
vim +347 kernel/trace/blktrace.c
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 342
1f2cac107c591c kernel/trace/blktrace.c Jens Axboe 2017-11-05 343 static int __blk_trace_remove(struct request_queue *q)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 344 {
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 345 struct blk_trace *bt;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 346
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 @347 bt = xchg(&q->blk_trace, NULL);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 348 if (!bt)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 349 return -EINVAL;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 350
5554720482a631 kernel/trace/blktrace.c Li Zefan 2009-03-25 351 if (bt->trace_state != Blktrace_running)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 352 blk_trace_cleanup(bt);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 353
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 354 return 0;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 355 }
1f2cac107c591c kernel/trace/blktrace.c Jens Axboe 2017-11-05 356
:::::: The code at line 347 was first introduced by commit
:::::: 2056a782f8e7e65fd4bfd027506b4ce1c5e9ccd4 [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23
:::::: TO: Jens Axboe <axboe@...e.de>
:::::: CC: Jens Axboe <axboe@...e.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33938 bytes)
Powered by blists - more mailing lists