After fixing bug 225338 and enabling EVDEV_SUPPORT, I got a kernel panic when I tried to scroll with the Elantech touch of a Gigabyte Aero 15X laptop: #4 0xffffffff80a947b3 in panic (fmt=<unavailable>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/kern/kern_shutdown.c:738 #5 0xffffffff80f3ff32 in trap_fatal (frame=0xfffffe0087dc2610, eva=328) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/amd64/amd64/trap.c:794 #6 0xffffffff80f3ffa2 in trap_pfault (frame=0xfffffe0087dc2610, usermode=0) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/amd64/amd64/trap.c:649 #7 0xffffffff80f3f772 in trap (frame=0xfffffe0087dc2610) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/amd64/amd64/trap.c:417 #8 <signal handler called> #9 0xffffffff8059e3d5 in bit_test (_bitstr=<optimized out>, _bit=<optimized out>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/sys/bitstring.h:141 #10 evdev_event_supported (type=2, evdev=<optimized out>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/dev/evdev/evdev.c:441 #11 evdev_check_event (type=2, code=0, evdev=<optimized out>, value=<optimized out>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/dev/evdev/evdev.c:490 #12 evdev_push_event (evdev=0x0, type=2, code=0, value=-16) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/dev/evdev/evdev.c:764 #13 0xffffffff80f67546 in evdev_push_rel (evdev=<optimized out>, code=<optimized out>, value=<optimized out>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/dev/evdev/evdev.h:172 #14 proc_elantech (pb=<optimized out>, sc=<optimized out>, ms=<optimized out>, x=<optimized out>, y=<optimized out>, z=<optimized out>) at /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/sys/dev/atkbdc/psm.c:4512 The problem is that the packet was erroneously detected as a trackpoint packet, but the device has no trackpoint. We later want to emit an evdev event for this packet, but the associated relative evdev device (`evdev_r`) is not initialized, causing the panic.
A commit references this bug: Author: dumbbell Date: Sat Jan 20 11:21:23 UTC 2018 New revision: 328191 URL: https://svnweb.freebsd.org/changeset/base/328191 Log: psm: Don't try to detect trackpoint packets if the Elantech device has none This fixes a panic when `EVDEV_SUPPORT` is enabled: if a trackpoint packet was detected but there was no trackpoint, we still tried to emit an evdev event even though the associated relative evdev device (`evdev_r`) was not initialized. PR: 225339 MFC after: 1 week Changes: head/sys/dev/atkbdc/psm.c
A commit references this bug: Author: dumbbell Date: Sat Jan 27 16:48:30 UTC 2018 New revision: 328482 URL: https://svnweb.freebsd.org/changeset/base/328482 Log: psm: Don't try to detect trackpoint packets if the Elantech device has none This fixes a panic when `EVDEV_SUPPORT` is enabled: if a trackpoint packet was detected but there was no trackpoint, we still tried to emit an evdev event even though the associated relative evdev device (`evdev_r`) was not initialized. PR: 225339 MFC of: r328191 Changes: _U stable/11/ stable/11/sys/dev/atkbdc/psm.c