* linux-next: build warning after merge of the tip tree
@ 2010-09-03 2:10 Stephen Rothwell
2010-09-03 2:12 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2010-09-03 2:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Haicheng Li, Andi Kleen, Wu Fengguang
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
Hi all,
After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:
arch/x86/mm/init_64.c: In function 'kernel_physical_mapping_init':
arch/x86/mm/init_64.c:601: warning: 'addr' may be used uninitialized in this function
The code does look suspicious ... 'addr' gets declared and then passed to
a function, but is not set anywhere ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: build warning after merge of the tip tree
2010-09-03 2:10 linux-next: build warning after merge of the tip tree Stephen Rothwell
@ 2010-09-03 2:12 ` Stephen Rothwell
2010-09-03 9:04 ` Wu Fengguang
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2010-09-03 2:12 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Haicheng Li, Andi Kleen, Wu Fengguang
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
On Fri, 3 Sep 2010 12:10:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> arch/x86/mm/init_64.c: In function 'kernel_physical_mapping_init':
> arch/x86/mm/init_64.c:601: warning: 'addr' may be used uninitialized in this function
>
> The code does look suspicious ... 'addr' gets declared and then passed to
> a function, but is not set anywhere ...
Forgot to say:
Introduced by commit 9b861528a8012e7bc4d1f7bae07395b225331477 ("x86-64,
mem: Update all PGDs for direct mapping and vmemmap mapping changes").
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-next: build warning after merge of the tip tree
2010-09-03 2:12 ` Stephen Rothwell
@ 2010-09-03 9:04 ` Wu Fengguang
2010-09-03 10:07 ` Haicheng Li
2010-09-03 13:15 ` [tip:x86/mm] x86, mm: fix uninitialized addr in kernel_physical_mapping_init() tip-bot for Wu Fengguang
0 siblings, 2 replies; 5+ messages in thread
From: Wu Fengguang @ 2010-09-03 9:04 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Haicheng Li, Andi Kleen
On Fri, Sep 03, 2010 at 10:12:01AM +0800, Stephen Rothwell wrote:
> On Fri, 3 Sep 2010 12:10:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > arch/x86/mm/init_64.c: In function 'kernel_physical_mapping_init':
> > arch/x86/mm/init_64.c:601: warning: 'addr' may be used uninitialized in this function
> >
> > The code does look suspicious ... 'addr' gets declared and then passed to
> > a function, but is not set anywhere ...
>
> Forgot to say:
>
> Introduced by commit 9b861528a8012e7bc4d1f7bae07395b225331477 ("x86-64,
> mem: Update all PGDs for direct mapping and vmemmap mapping changes").
The original patch has the following line, however get lost some time
later:
http://www.spinics.net/lists/linux-mm/msg08152.html
===
x86, mm: fix uninitialized addr in kernel_physical_mapping_init()
This re-adds the lost chunk in commit 9b861528a80.
CC: Haicheng Li <haicheng.li@linux.intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 64e7bc2..74f0f35 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -570,6 +570,7 @@ kernel_physical_mapping_init(unsigned long start,
start = (unsigned long)__va(start);
end = (unsigned long)__va(end);
+ addr = start;
for (; start < end; start = next) {
pgd_t *pgd = pgd_offset_k(start);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-next: build warning after merge of the tip tree
2010-09-03 9:04 ` Wu Fengguang
@ 2010-09-03 10:07 ` Haicheng Li
2010-09-03 13:15 ` [tip:x86/mm] x86, mm: fix uninitialized addr in kernel_physical_mapping_init() tip-bot for Wu Fengguang
1 sibling, 0 replies; 5+ messages in thread
From: Haicheng Li @ 2010-09-03 10:07 UTC (permalink / raw)
To: Wu Fengguang
Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
Peter Zijlstra, linux-next, linux-kernel, Andi Kleen
Wu Fengguang wrote:
> On Fri, Sep 03, 2010 at 10:12:01AM +0800, Stephen Rothwell wrote:
>> On Fri, 3 Sep 2010 12:10:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
>>> produced this warning:
>>>
>>> arch/x86/mm/init_64.c: In function 'kernel_physical_mapping_init':
>>> arch/x86/mm/init_64.c:601: warning: 'addr' may be used uninitialized in this function
>>>
>>> The code does look suspicious ... 'addr' gets declared and then passed to
>>> a function, but is not set anywhere ...
>> Forgot to say:
>>
>> Introduced by commit 9b861528a8012e7bc4d1f7bae07395b225331477 ("x86-64,
>> mem: Update all PGDs for direct mapping and vmemmap mapping changes").
>
>
> The original patch has the following line, however get lost some time
> later:
>
> http://www.spinics.net/lists/linux-mm/msg08152.html
>
> ===
> x86, mm: fix uninitialized addr in kernel_physical_mapping_init()
>
> This re-adds the lost chunk in commit 9b861528a80.
>
> CC: Haicheng Li <haicheng.li@linux.intel.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 64e7bc2..74f0f35 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -570,6 +570,7 @@ kernel_physical_mapping_init(unsigned long start,
>
> start = (unsigned long)__va(start);
> end = (unsigned long)__va(end);
> + addr = start;
weird, this line was in my original patch: http://lkml.org/lkml/2010/8/20/166
Acked-by: Haicheng Li <haicheng.li@linux.intel.com>
> for (; start < end; start = next) {
> pgd_t *pgd = pgd_offset_k(start);
>
^ permalink raw reply [flat|nested] 5+ messages in thread* [tip:x86/mm] x86, mm: fix uninitialized addr in kernel_physical_mapping_init()
2010-09-03 9:04 ` Wu Fengguang
2010-09-03 10:07 ` Haicheng Li
@ 2010-09-03 13:15 ` tip-bot for Wu Fengguang
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Wu Fengguang @ 2010-09-03 13:15 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, haicheng.li, hpa, mingo, peterz, ak, tglx, sfr,
fengguang.wu, mingo
Commit-ID: 1c5f50ee347daea013671f718b70cd6bf497bef9
Gitweb: http://git.kernel.org/tip/1c5f50ee347daea013671f718b70cd6bf497bef9
Author: Wu Fengguang <fengguang.wu@intel.com>
AuthorDate: Fri, 3 Sep 2010 17:04:07 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 3 Sep 2010 11:40:11 +0200
x86, mm: fix uninitialized addr in kernel_physical_mapping_init()
This re-adds the lost chunk in commit 9b861528a80.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Haicheng Li <haicheng.li@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <20100903090407.GA19771@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/init_64.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 64e7bc2..74f0f35 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -570,6 +570,7 @@ kernel_physical_mapping_init(unsigned long start,
start = (unsigned long)__va(start);
end = (unsigned long)__va(end);
+ addr = start;
for (; start < end; start = next) {
pgd_t *pgd = pgd_offset_k(start);
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-03 13:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-03 2:10 linux-next: build warning after merge of the tip tree Stephen Rothwell
2010-09-03 2:12 ` Stephen Rothwell
2010-09-03 9:04 ` Wu Fengguang
2010-09-03 10:07 ` Haicheng Li
2010-09-03 13:15 ` [tip:x86/mm] x86, mm: fix uninitialized addr in kernel_physical_mapping_init() tip-bot for Wu Fengguang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome