Messages in this thread | | | From | Andrey Konovalov <> | Date | Mon, 23 Oct 2023 18:16:42 +0200 | Subject | Re: [PATCH v2 11/19] lib/stackdepot: use read/write lock |
| |
On Mon, Oct 9, 2023 at 11:45 AM Alexander Potapenko <glider@google.com> wrote: > > > static struct stack_record *depot_fetch_stack(depot_stack_handle_t handle) > > { > > union handle_parts parts = { .handle = handle }; > > - /* > > - * READ_ONCE pairs with potential concurrent write in > > - * depot_init_pool. > > - */ > > - int pools_num_cached = READ_ONCE(pools_num); > > void *pool; > > size_t offset = parts.offset << DEPOT_STACK_ALIGN; > > struct stack_record *stack; > > > > - if (parts.pool_index > pools_num_cached) { > > + lockdep_assert_held(&pool_rwlock); > > Shouldn't it be lockdep_assert_held_read()?
Indeed, this is more precise. Will fix in v3, thanks!
| |