Re: [PATCH -v2 mm 2/4] kasan: handle concurrent kasan_record_aux_stack calls

From: Andrey Konovalov
Date: Tue Dec 19 2023 - 16:20:02 EST


On Thu, Dec 14, 2023 at 9:35 AM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> > #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)
> > @@ -249,6 +250,7 @@ struct kasan_global {
> > struct kasan_alloc_meta {
> > struct kasan_track alloc_track;
> > /* Free track is stored in kasan_free_meta. */
> > + spinlock_t aux_lock;
>
> This needs to be raw_spinlock, because
> kasan_record_aux_stack_noalloc() can be called from non-sleepable
> contexts (otherwise lockdep will complain for RT kernels).

Right, will fix in v3. Thank you!