x86/vdso: Fix vdso2c's special_pages[] error checking
authorAndy Lutomirski <luto@amacapital.net>
Wed, 30 Jul 2014 21:59:49 +0000 (14:59 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Sep 2014 07:55:38 +0000 (09:55 +0200)
commitf12c1f9002d27374fd205f6e692891116ca22272
tree72969fd94198bb5fa4429b7e36c870a7b820e67e
parentf3670394c29ff3730638762c1760fd2f624e6d7b
x86/vdso: Fix vdso2c's special_pages[] error checking

Stephen Rothwell's compiler did something amazing: it unrolled a
loop, discovered that one iteration of that loop contained an
always-true test, and emitted a warning that will IMO only serve
to convince people to disable the warning.

That bogus warning caused me to wonder what prompted such an
absurdity from his compiler, and I discovered that the code in
question was, in fact, completely wrong -- I was looking things
up in the wrong array.

This affects 3.16 as well, but the only effect is to screw up
the error checking a bit.  vdso2c's output is unaffected.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/53d96ad5.80ywqrbs33ZBCQej%25akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/vdso/vdso2c.h