/* This is a test BPF program that uses struct_ops to access a referenced *kptrargument.Thisisatestfortheverifiertoensurethatit *1)recognizesthetaskasareferencedobject(i.e.,ref_obj_id>0),and *2)thesamereferencecanbeacquiredfrommultiplepathsaslongasit *hasnotbeenreleased.
*/
SEC("struct_ops/test_refcounted") int BPF_PROG(refcounted, int dummy, struct task_struct *task)
{ if (dummy == 1)
bpf_task_release(task); else
bpf_task_release(task); return0;
}