The global page accounting functions are currently using "+=" against a
ulong. But this can happen at interrupt time as well, and "+=" is not
atomic against interrupt-time modification of the same word.
Change it to use local_irq_save()
#define mod_page_state(member, delta) \
do { \
- int cpu = get_cpu(); \
- per_cpu(page_states, cpu).member += (delta); \
- put_cpu(); \
+ unsigned long flags; \
+ local_irq_save(flags); \
+ __get_cpu_var(page_states).member += (delta); \
+ local_irq_restore(flags); \
} while (0)
#define inc_page_state(member) mod_page_state(member, 1UL)