[PATCH] fix for "lib/stackdepot: allow users to evict stack traces"

From: andrey . konovalov
Date: Thu Oct 26 2023 - 18:33:55 EST


From: Andrey Konovalov <andreyknvl@xxxxxxxxxx>

Commit "lib/stackdepot: allow users to evict stack traces" adds another
user for depot_fetch_stack, which holds a write lock. Thus, we need to
update the lockdep annotation.

Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
---
lib/stackdepot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 3a8f045696fd..cf707ff32d7d 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -388,7 +388,7 @@ static struct stack_record *depot_fetch_stack(depot_stack_handle_t handle)
size_t offset = parts.offset << DEPOT_STACK_ALIGN;
struct stack_record *stack;

- lockdep_assert_held_read(&pool_rwlock);
+ lockdep_assert_held(&pool_rwlock);

if (parts.pool_index > pools_num) {
WARN(1, "pool index %d out of bounds (%d) for stack id %08x\n",
--
2.25.1