Skip to content
  • Andi Kleen's avatar
    Make the taint flags reliable · 25ddbb18
    Andi Kleen authored
    
    
    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: default avatarAndi Kleen <ak@linux.intel.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    25ddbb18