summaryrefslogtreecommitdiff
path: root/drivers/mfd/sky81452.c
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2022-11-18 07:26:04 +0530
committerAlexei Starovoitov <ast@kernel.org>2022-11-17 19:22:14 -0800
commitac9f06050a3580cf4076a57a470cd71f12a81171 (patch)
tree7bd331dc4f348eb14778aa3b9062e3d028717625 /drivers/mfd/sky81452.c
parent958cf2e273f0929c66169e0788031310e8118722 (diff)
downloadlinux-ac9f06050a3580cf4076a57a470cd71f12a81171.tar.gz
linux-ac9f06050a3580cf4076a57a470cd71f12a81171.tar.bz2
linux-ac9f06050a3580cf4076a57a470cd71f12a81171.zip
bpf: Introduce bpf_obj_drop
Introduce bpf_obj_drop, which is the kfunc used to free allocated objects (allocated using bpf_obj_new). Pairing with bpf_obj_new, it implicitly destructs the fields part of object automatically without user intervention. Just like the previous patch, btf_struct_meta that is needed to free up the special fields is passed as a hidden argument to the kfunc. For the user, a convenience macro hides over the kernel side kfunc which is named bpf_obj_drop_impl. Continuing the previous example: void prog(void) { struct foo *f; f = bpf_obj_new(typeof(*f)); if (!f) return; bpf_obj_drop(f); } Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20221118015614.2013203-15-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/mfd/sky81452.c')
0 files changed, 0 insertions, 0 deletions