Make the taint flags reliable
authorAndi Kleen <andi@firstfloor.org>
Thu, 16 Oct 2008 05:01:41 +0000 (22:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:31 +0000 (11:21 -0700)
commit25ddbb18aae33ad255eb9f35aacebe3af01e1e9c
tree8df1f840a226ed640c2096710b7d0f1f4d1b88aa
parent889d51a10712b6fd6175196626de2116858394f4
Make the taint flags reliable

It's somewhat unlikely that it happens, but right now a race window
between interrupts or machine checks or oopses could corrupt the tainted
bitmap because it is modified in a non atomic fashion.

Convert the taint variable to an unsigned long and use only atomic bit
operations on it.

Unfortunately this means the intvec sysctl functions cannot be used on it
anymore.

It turned out the taint sysctl handler could actually be simplified a bit
(since it only increases capabilities) so this patch actually removes
code.

[akpm@linux-foundation.org: remove unneeded include]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/smpboot.c
include/linux/kernel.h
kernel/module.c
kernel/panic.c
kernel/softlockup.c
kernel/sysctl.c