mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: [rcu:test 70/72] kernel/rcu/tree_plugin.h:1888:3: warning: 'flags' may be used uninitialized in this function
Date: Fri, 31 May 2019 01:47:46 +0800	[thread overview]
Message-ID: <201905310145.uZFVCzHs%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git test
head:   77ef1b88654653681661fb0ce7cc1d6e712a409f
commit: 6ad9e6bcf543a758d4b7323cb2909ebd66f39ee4 [70/72] fixup! rcu/nocb: Avoid ->nocb_lock capture by corresponding CPU
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 6ad9e6bcf543a758d4b7323cb2909ebd66f39ee4
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from kernel/rcu/tree.c:3519:0:
   kernel/rcu/tree_plugin.h: In function 'do_nocb_deferred_wakeup_common':
>> kernel/rcu/tree_plugin.h:1888:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
      rcu_nocb_unlock_irqrestore(rdp, flags);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/rcu/tree_plugin.h: In function 'rcu_nocb_gp_kthread':
   kernel/rcu/tree_plugin.h:1790:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
      rcu_nocb_unlock_irqrestore(my_rdp, flags);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/rcu/tree_plugin.h:1721:16: note: 'flags' was declared here
     unsigned long flags;
                   ^~~~~

vim +/flags +1888 kernel/rcu/tree_plugin.h

  1879	
  1880	/* Do a deferred wakeup of rcu_nocb_kthread(). */
  1881	static void do_nocb_deferred_wakeup_common(struct rcu_data *rdp)
  1882	{
  1883		unsigned long flags;
  1884		int ndw;
  1885	
  1886		rcu_nocb_lock_irqsave(rdp, flags);
  1887		if (!rcu_nocb_need_deferred_wakeup(rdp)) {
> 1888			rcu_nocb_unlock_irqrestore(rdp, flags);
  1889			return;
  1890		}
  1891		ndw = READ_ONCE(rdp->nocb_defer_wakeup);
  1892		WRITE_ONCE(rdp->nocb_defer_wakeup, RCU_NOCB_WAKE_NOT);
  1893		wake_nocb_gp(rdp, ndw == RCU_NOCB_WAKE_FORCE, flags);
  1894		trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("DeferredWake"));
  1895	}
  1896	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

                 reply	other threads:[~2019-05-30 17:47 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=201905310145.uZFVCzHs%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.ibm.com \
    /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®