[PATCH v3 5/6] KEYS: Replace assoc_array with rhashtable

Jarkko Sakkinen jarkko at kernel.org
Sun Oct 25 16:08:41 UTC 2026


On Sun, Oct 25, 2026 at 05:35:56AM +0200, Jarkko Sakkinen wrote:
> On Sun, Oct 25, 2026 at 01:05:06AM +0000, sashiko-bot at kernel.org wrote:
> > kernel/bpf/keys.c:bpf_lookup_keyring() {
> > 	struct bpf_key *bkey;
> > 
> > 	if (!bpf_keyring)
> > 		return NULL;
> > 	if (!READ_ONCE(bpf_keyring->keys.nr_leaves_on_tree) ||
> > 	    !READ_ONCE(bpf_keyring->restrict_link))
> > 		return NULL;
> > 	...
> > }
> > 
> > Should bpf_lookup_keyring() be updated to call keyring_is_empty(bpf_keyring)
> > instead?
> 
> I don't have this file in my tree and git grep nr_leaves_on_tree gives
> nothing.

It's in linux-next.

Br, Jarkko



More information about the Linux-security-module-archive mailing list