projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
685dada
)
HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
author
Benjamin Tissoires
<bentiss@kernel.org>
Thu, 11 Apr 2024 07:05:56 +0000
(09:05 +0200)
committer
Benjamin Tissoires
<bentiss@kernel.org>
Thu, 11 Apr 2024 14:02:01 +0000
(16:02 +0200)
Reported by linux-next:
After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
(.text+0x1c75181): undefined reference to `hid_input_report'
Caused by commit
9be50ac30a83
("HID: bpf: allow to inject HID event
from BPF")
I just forgot to put the indirection in place.
Link:
https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/
Fixes: 9be50ac30a83 ("HID: bpf: allow to inject HID event from BPF")
Link:
https://lore.kernel.org/r/20240411-fix-hid-bpf-v1-1-4ae913031a8c@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/bpf/hid_bpf_dispatch.c
patch
|
blob
|
history
diff --git
a/drivers/hid/bpf/hid_bpf_dispatch.c
b/drivers/hid/bpf/hid_bpf_dispatch.c
index 79ece3d1b9e2c044df63f2a4f67c2acd23a8d1b5..10289f44d0cc1f49cc86178c3ed8d9c85ea61395 100644
(file)
--- a/
drivers/hid/bpf/hid_bpf_dispatch.c
+++ b/
drivers/hid/bpf/hid_bpf_dispatch.c
@@
-534,7
+534,7
@@
hid_bpf_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf
hdev = (struct hid_device *)ctx->hid; /* discard const */
- return hid_input_report(hdev, type, buf, size, 0);
+ return hid_
bpf_ops->hid_
input_report(hdev, type, buf, size, 0);
}
__bpf_kfunc_end_defs();