On Mon, Dec 06, 2021 at 03:19:08PM +0000, KP Singh wrote: > @@ -213,7 +233,8 @@ bpf_local_storage_lookup(struct bpf_local_storage *local_storage, > struct bpf_local_storage_elem *selem; > > /* Fast path (cache hit) */ > - sdata = rcu_dereference(local_storage->cache[smap->cache_idx]); > + sdata = rcu_dereference_check(local_storage->cache[smap->cache_idx], > + bpf_rcu_lock_held()); > if (sdata && rcu_access_pointer(sdata->smap) == smap) > return sdata; In the slow path logic after this, it should need a hlist_for_each_entry_rcu(..., rcu_read_lock_trace_held()) Others lgtm. I will take another fresh look tomorrow. Thanks for the patches !