mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: Re: [rcu:dev.2018.10.03a 44/73] kernel/rcu/tree.c:2704:5: warning: 'max_cpu' may be used uninitialized in this function
Date: Sat, 13 Oct 2018 16:19:02 -0700	[thread overview]
Message-ID: <20181013231902.GI2674@linux.ibm.com> (raw)
In-Reply-To: <201810081957.GsKmX8Wz%fengguang.wu@intel.com>

On Mon, Oct 08, 2018 at 07:25:58PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2018.10.03a
> head:   ef44a26c84188888f97e5d7b3f8e4f8c0decd248
> commit: 813f47a94e3b61439bba90340b532f3a6319d4f5 [44/73] rcu: Print per-CPU callback counts for forward-progress failures
> config: x86_64-randconfig-x006-10081527 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
>         git checkout 813f47a94e3b61439bba90340b532f3a6319d4f5
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> 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 >>):
> 
>    kernel/rcu/tree.c: In function 'rcu_fwd_progress_check':
> >> kernel/rcu/tree.c:2704:5: warning: 'max_cpu' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      if (max_cpu >= 0)
>         ^
> >> kernel/rcu/tree.c:2699:6: warning: 'max_cbs' may be used uninitialized in this function [-Wmaybe-uninitialized]
>       if (cbs <= max_cbs)
>          ^

Good catch!  A fix is on its way.

							Thanx, Paul

> vim +/max_cpu +2704 kernel/rcu/tree.c
> 
>   2670	
>   2671	/*
>   2672	 * Do a forward-progress check for rcutorture.  This is normally invoked
>   2673	 * due to an OOM event.  The argument "j" gives the time period during
>   2674	 * which rcutorture would like progress to have been made.
>   2675	 */
>   2676	void rcu_fwd_progress_check(unsigned long j)
>   2677	{
>   2678		unsigned long cbs;
>   2679		int cpu;
>   2680		unsigned long max_cbs;
>   2681		int max_cpu;
>   2682		struct rcu_data *rdp;
>   2683	
>   2684		if (rcu_gp_in_progress()) {
>   2685			show_rcu_gp_kthreads();
>   2686		} else {
>   2687			preempt_disable();
>   2688			rdp = this_cpu_ptr(&rcu_data);
>   2689			rcu_check_gp_start_stall(rdp->mynode, rdp, j);
>   2690			preempt_enable();
>   2691		}
>   2692		for_each_possible_cpu(cpu) {
>   2693			cbs = rcu_get_n_cbs_cpu(cpu);
>   2694			if (!cbs)
>   2695				continue;
>   2696			if (max_cpu < 0)
>   2697				pr_info("%s: callbacks", __func__);
>   2698			pr_cont(" %d: %lu", cpu, cbs);
> > 2699			if (cbs <= max_cbs)
>   2700				continue;
>   2701			max_cbs = cbs;
>   2702			max_cpu = cpu;
>   2703		}
> > 2704		if (max_cpu >= 0)
>   2705			pr_cont("\n");
>   2706	}
>   2707	EXPORT_SYMBOL_GPL(rcu_fwd_progress_check);
>   2708	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



      reply	other threads:[~2018-10-13 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 11:25 kbuild test robot
2018-10-13 23:19 ` Paul E. McKenney [this message]

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=20181013231902.GI2674@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.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®