mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Sven Schnelle <svens@linux.ibm.com>
Subject: include/vdso/helpers.h:37:9: sparse: sparse: context imbalance in 'vdso_update_begin' - wrong count at exit
Date: Wed, 19 Aug 2020 06:45:49 +0800	[thread overview]
Message-ID: <202008190646.bz9uHEhA%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
commit: 19d0070a2792181f79df01277fe00b83b9f7eda7 timekeeping/vsyscall: Provide vdso_update_begin/end()
date:   13 days ago
config: arm64-randconfig-s031-20200818 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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.2-183-gaa6ede3b-dirty
        git checkout 19d0070a2792181f79df01277fe00b83b9f7eda7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 

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


sparse warnings: (new ones prefixed by >>)

   kernel/time/vsyscall.c: note: in included file:
>> include/vdso/helpers.h:37:9: sparse: sparse: context imbalance in 'vdso_update_begin' - wrong count at exit
   kernel/time/vsyscall.c:163:6: sparse: sparse: context imbalance in 'vdso_update_end' - unexpected unlock

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19d0070a2792181f79df01277fe00b83b9f7eda7
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 19d0070a2792181f79df01277fe00b83b9f7eda7
vim +/vdso_update_begin +37 include/vdso/helpers.h

00b26474c2f161 Vincenzo Frascino 2019-06-21  29  
00b26474c2f161 Vincenzo Frascino 2019-06-21  30  static __always_inline void vdso_write_begin(struct vdso_data *vd)
00b26474c2f161 Vincenzo Frascino 2019-06-21  31  {
00b26474c2f161 Vincenzo Frascino 2019-06-21  32  	/*
00b26474c2f161 Vincenzo Frascino 2019-06-21  33  	 * WRITE_ONCE it is required otherwise the compiler can validly tear
00b26474c2f161 Vincenzo Frascino 2019-06-21  34  	 * updates to vd[x].seq and it is possible that the value seen by the
00b26474c2f161 Vincenzo Frascino 2019-06-21  35  	 * reader it is inconsistent.
00b26474c2f161 Vincenzo Frascino 2019-06-21  36  	 */
00b26474c2f161 Vincenzo Frascino 2019-06-21 @37  	WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
00b26474c2f161 Vincenzo Frascino 2019-06-21  38  	WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
00b26474c2f161 Vincenzo Frascino 2019-06-21  39  	smp_wmb();
00b26474c2f161 Vincenzo Frascino 2019-06-21  40  }
00b26474c2f161 Vincenzo Frascino 2019-06-21  41  

:::::: The code at line 37 was first introduced by commit
:::::: 00b26474c2f1613d7ab894c525f775c67c8a9e8f lib/vdso: Provide generic VDSO implementation

:::::: TO: Vincenzo Frascino <vincenzo.frascino@arm.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34098 bytes --]

                 reply	other threads:[~2020-08-18 23:12 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=202008190646.bz9uHEhA%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    /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®