Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671358 > unrolled thread

linux-next: build warning after merge of the percpu tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-06-21 07:30 +0200
Last post2017-06-21 18:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build warning after merge of the percpu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-06-21 07:30 +0200
    Re: [PATCH 1/1] percpu: resolve err may not be initialized in  pcpu_alloc Tejun Heo <tj@kernel.org> - 2017-06-21 18:30 +0200

#1671358 — linux-next: build warning after merge of the percpu tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-06-21 07:30 +0200
Subjectlinux-next: build warning after merge of the percpu tree
Message-ID<tUGng-1Tn-31@gated-at.bofh.it>
Hi all,

After merging the percpu tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from include/linux/kernel.h:13:0,
                 from include/linux/bitmap.h:9,
                 from mm/percpu.c:58:
mm/percpu.c: In function 'pcpu_alloc':
include/linux/printk.h:303:2: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
  ^
mm/percpu.c:864:14: note: 'err' was declared here
  const char *err;
              ^

I am not sure which commit introduced this, although the

	if (is_atomic)
		goto fail;

in pcpu_alloc() looks suspicious.

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1671769 — Re: [PATCH 1/1] percpu: resolve err may not be initialized in pcpu_alloc

FromTejun Heo <tj@kernel.org>
Date2017-06-21 18:30 +0200
SubjectRe: [PATCH 1/1] percpu: resolve err may not be initialized in pcpu_alloc
Message-ID<tUQG0-8uH-57@gated-at.bofh.it>
In reply to#1671358
On Wed, Jun 21, 2017 at 11:51:09AM -0400, Dennis Zhou wrote:
> From 4a42ecc735cff0015cc73c3d87edede631f4b885 Mon Sep 17 00:00:00 2001
> From: Dennis Zhou <dennisz@fb.com>
> Date: Wed, 21 Jun 2017 08:07:15 -0700
> 
> Add error message to out of space failure for atomic allocations in
> percpu allocation path to fix -Wmaybe-uninitialized.
> 
> Signed-off-by: Dennis Zhou <dennisz@fb.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied to percpu/for-4.13.

Thanks.

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web