Lines Matching refs:bkey
1259 struct bpf_key *bkey; in bpf_lookup_user_key() local
1272 bkey = kmalloc(sizeof(*bkey), GFP_KERNEL); in bpf_lookup_user_key()
1273 if (!bkey) { in bpf_lookup_user_key()
1278 bkey->key = key_ref_to_ptr(key_ref); in bpf_lookup_user_key()
1279 bkey->has_ref = true; in bpf_lookup_user_key()
1281 return bkey; in bpf_lookup_user_key()
1307 struct bpf_key *bkey; in bpf_lookup_system_key() local
1312 bkey = kmalloc(sizeof(*bkey), GFP_ATOMIC); in bpf_lookup_system_key()
1313 if (!bkey) in bpf_lookup_system_key()
1316 bkey->key = (struct key *)(unsigned long)id; in bpf_lookup_system_key()
1317 bkey->has_ref = false; in bpf_lookup_system_key()
1319 return bkey; in bpf_lookup_system_key()
1329 void bpf_key_put(struct bpf_key *bkey) in bpf_key_put() argument
1331 if (bkey->has_ref) in bpf_key_put()
1332 key_put(bkey->key); in bpf_key_put()
1334 kfree(bkey); in bpf_key_put()