From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: kernel/rcu/refscale.c:614:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
Date: Fri, 24 Feb 2023 22:12:43 +0800 [thread overview]
Message-ID: <202302242216.C9zAq2tw-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2980d8d826554fa6981d621e569a453787472f8
commit: a6889becb05394255c80b62103677e3b095726a9 refscale: Add tests using SLAB_TYPESAFE_BY_RCU
date: 7 weeks ago
config: parisc-randconfig-s052-20230222 (https://download.01.org/0day-ci/archive/20230224/202302242216.C9zAq2tw-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a6889becb05394255c80b62103677e3b095726a9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a6889becb05394255c80b62103677e3b095726a9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash kernel/rcu/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302242216.C9zAq2tw-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/rcu/refscale.c:614:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> kernel/rcu/refscale.c:614:24: sparse: struct refscale_typesafe [noderef] __rcu *
>> kernel/rcu/refscale.c:614:24: sparse: struct refscale_typesafe *
kernel/rcu/refscale.c:569:13: sparse: sparse: context imbalance in 'typesafe_lock_acquire' - wrong count at exit
kernel/rcu/refscale.c:576:13: sparse: sparse: context imbalance in 'typesafe_lock_release' - unexpected unlock
vim +614 kernel/rcu/refscale.c
595
596 // Do a read-side critical section with the specified delay in
597 // microseconds and nanoseconds inserted so as to increase probability
598 // of failure.
599 static void typesafe_delay_section(const int nloops, const int udl, const int ndl)
600 {
601 unsigned int a;
602 unsigned int b;
603 int i;
604 long idx;
605 struct refscale_typesafe *rtsp;
606 unsigned int start;
607
608 for (i = nloops; i >= 0; i--) {
609 preempt_disable();
610 idx = torture_random(this_cpu_ptr(&refscale_rand)) % rtsarray_size;
611 preempt_enable();
612 retry:
613 rcu_read_lock();
> 614 rtsp = rcu_dereference(rtsarray[idx]);
615 a = READ_ONCE(rtsp->a);
616 if (!rts_acquire(rtsp, &start)) {
617 rcu_read_unlock();
618 goto retry;
619 }
620 if (a != READ_ONCE(rtsp->a)) {
621 (void)rts_release(rtsp, start);
622 rcu_read_unlock();
623 goto retry;
624 }
625 un_delay(udl, ndl);
626 // Remember, seqlock read-side release can fail.
627 if (!rts_release(rtsp, start)) {
628 rcu_read_unlock();
629 goto retry;
630 }
631 b = READ_ONCE(rtsp->a);
632 WARN_ONCE(a != b, "Re-read of ->a changed from %u to %u.\n", a, b);
633 b = rtsp->b;
634 rcu_read_unlock();
635 WARN_ON_ONCE(a * a != b);
636 }
637 }
638
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-02-24 14:13 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=202302242216.C9zAq2tw-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paulmck@kernel.org \
/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®