The latest wacom driver (kernel 5.10.8) causes my system (Lenovo Yoga 370) to freeze as soon as the pen is used (with Xorg). By freeze I mean it becomes totally unresponsive (no network, no response to input, nothing in the log files). Reverting commit 797c128d3c7d95ecc6a2113aae5de109736fba10 ("HID: wacom: Fix memory leakage caused by kfifo_alloc") seems to fix the problem.
Created attachment 294789 [details] Patch wacom driver by making wacom_wac->pen_fifo a pointer This patch fixes the bug on my device. But it might be complete nonsense because I'm not familiar with this kind of problems. In commit 37309f47e2f5674f3e86cb765312ace42cfcedf5 it was intended to allocate the memory associated with `wacom_wac->pen_fifo` using `devres_alloc()`. This should make sure that memory is freed once it is not needed anymore. However, to my limited understanding this is only possible if `wacom_wac->pen_fifo` is a pointer, which can be allocated by `devres_alloc`. With this patch `pen_fifo` becomes a pointer, which can be dynamically allocated using `devres_alloc`. I don't know if this is reasonable in any way or has any advantage compared to the code before commit 37309f47e2f5674f3e86cb765312ace42cfcedf5.
I tried the patch from Valentin, and it seems to work for me. Of course, I only tested very briefly. I'll report back should something show up in the coming days.
@Valentin's patch also fixes it for me (thanks Valentin). My symptoms were different (no freeze, simply the pen and touchscreen no longer worked). See also https://bugzilla.kernel.org/show_bug.cgi?id=211275 (probably a duplicate of this one). (Also, this should be flagged as a regression).
*** Bug 211275 has been marked as a duplicate of this bug. ***
Patch seems to have been accepted (5.10.12 has it).