On 03/23/2018 09:05 PM, Andrey Konovalov wrote: > diff --git a/mm/kasan/khwasan.c b/mm/kasan/khwasan.c > index 24d75245e9d0..da4b17997c71 100644 > --- a/mm/kasan/khwasan.c > +++ b/mm/kasan/khwasan.c > @@ -39,6 +39,57 @@ > #include "kasan.h" > #include "../slab.h" > > +int khwasan_enabled; This is not unused (set, but never used). > + > +static DEFINE_PER_CPU(u32, prng_state); > + > +void khwasan_init(void) > +{ > + int cpu; > + > + for_each_possible_cpu(cpu) { > + per_cpu(prng_state, cpu) = get_random_u32(); > + } > + WRITE_ONCE(khwasan_enabled, 1); > +} > +