Re: [linus:master] [kasan] a414d4286f: INFO:trying_to_register_non-static_key

From: Tetsuo Handa
Date: Thu Jan 11 2024 - 10:52:30 EST


Commit a414d4286f34 ("kasan: handle concurrent kasan_record_aux_stack calls")
calls raw_spin_lock_init(&alloc_meta->aux_lock) after __memset() in
kasan_init_object_meta(), but does not call raw_spin_lock_init() after __memset()
in release_alloc_meta(), resulting in lock map information being zeroed out?

We should not zero out the whole sizeof(struct kasan_alloc_meta) bytes from
release_alloc_meta() in order not to undo raw_spin_lock_init() from
kasan_init_object_meta() ?

On 2024/01/11 16:29, kernel test robot wrote:
> [ 1.582812][ T0] INFO: trying to register non-static key.
> [ 1.583305][ T0] The code is fine but needs lockdep annotation, or maybe
> [ 1.583887][ T0] you didn't initialize this object before use?
> [ 1.584409][ T0] turning off the locking correctness validator.