highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow
[safe/jmp/linux-2.6] / mm / highmem.c
index 25878cc..33587de 100644 (file)
@@ -426,9 +426,9 @@ void __init page_address_init(void)
 
 void debug_kmap_atomic(enum km_type type)
 {
-       static unsigned warn_count = 10;
+       static int warn_count = 10;
 
-       if (unlikely(warn_count == 0))
+       if (unlikely(warn_count < 0))
                return;
 
        if (unlikely(in_interrupt())) {