bpf: enable detaching links of struct_ops objects.
authorKui-Feng Lee <thinker.li@gmail.com>
Thu, 30 May 2024 06:59:40 +0000 (23:59 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 30 May 2024 22:34:13 +0000 (15:34 -0700)
commit6fb2544ea1493f52e50b753604791c01bd2cf897
tree0876de2cb261e1fcf94fdb11672018e99e065b22
parent73287fe228721b05690e671adbcccc6cf5435be6
bpf: enable detaching links of struct_ops objects.

Implement the detach callback in bpf_link_ops for struct_ops so that user
programs can detach a struct_ops link. The subsystems that struct_ops
objects are registered to can also use this callback to detach the links
being passed to them.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240530065946.979330-3-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
kernel/bpf/bpf_struct_ops.c