Re: [PATCH v2] kasan: remove kasan_find_vm_area() to prevent possible deadlock
From: Sebastian Andrzej Siewior
Date: Mon Jul 07 2025 - 04:44:54 EST
On 2025-07-07 09:33:54 [+0100], Yeoreum Yun wrote:
> Hi Sebastian,
Hi,
> > what is DEPT?
>
> Please check the below patchset:
> https://lore.kernel.org/all/20250519091826.19752-1-byungchul@xxxxxx/
Thank you.
Would lockdep see this if check_region_inline() would have something
like (minus missing exports, just illustrate the idea)
diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c
index d54e89f8c3e76..c74e8e0863723 100644
--- a/mm/kasan/generic.c
+++ b/mm/kasan/generic.c
@@ -171,6 +171,11 @@ static __always_inline bool check_region_inline(const void *addr,
if (unlikely(size == 0))
return true;
+ {
+ struct vmap_node *vn = vn = &vmap_nodes[0];
+ might_lock(vn->busy.lock);
+ }
+
if (unlikely(addr + size < addr))
return !kasan_report(addr, size, write, ret_ip);
? Just to understand if lockdep is missing something essential or if
DEPT was simply enabled why this "bad" accessed occurred and was able to
see the lock chain which otherwise stays invisible.
> Thanks!
Sebastian