mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-11 13:44:43 -04:00
Allow bpf_kptr_xchg to directly operate on pointers marked with NON_OWN_REF | MEM_RCU. In the example demonstrated in this patch, as long as "struct bpf_refcount ref" exists, the __kptr pointer is guaranteed to carry the MEM_RCU flag. The ref member itself does not need to be explicitly used. Signed-off-by: Kaitao Cheng <chengkaitao@kylinos.cn> Link: https://lore.kernel.org/r/20260214124042.62229-6-pilgrimtao@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>