HID: bpf: allow to use bpf_timer_set_sleepable_cb() in tracing callbacks.
authorBenjamin Tissoires <bentiss@kernel.org>
Fri, 15 Mar 2024 14:44:44 +0000 (15:44 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Wed, 10 Apr 2024 14:38:37 +0000 (16:38 +0200)
commit685dadafbde29dc3d6b7a13be284d684b06d4d4f
treea3c3ea15f7998a7c241e8d8a8561e94f4e9a52bf
parent2c0e8ced7d4bf746923fc424415844d695f07808
HID: bpf: allow to use bpf_timer_set_sleepable_cb() in tracing callbacks.

Export the sleepable kfuncs we have on HID-BPF in tracing bpf programs,
but with the condition of being used in a sleepable context.
This allows to use the bpf_timer when used in a sleepable context
through bpf_timer_set_sleepable_cb() and initiate work from a device event.

Link: https://lore.kernel.org/r/20240315-b4-hid-bpf-new-funcs-v4-7-079c282469d3@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/bpf/hid_bpf_dispatch.c