]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: gpio: Add gpio-cdev-uaf tests
authorTzung-Bi Shih <tzungbi@kernel.org>
Mon, 23 Feb 2026 06:17:26 +0000 (14:17 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 27 Feb 2026 09:05:22 +0000 (10:05 +0100)
commitc7f92042d3f3d4f084794f5314fa10366084179c
treed006ea59777e5094722c305590b804528f48eb20
parentee68f18d1f0d943d93070eb8cb05598b8b7f0922
selftests: gpio: Add gpio-cdev-uaf tests

Add tests for gpiolib-cdev to make sure accessing to dangling resources
via the opening file descriptor won't crash the system after the
underlying resource providers have gone.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260223061726.82161-7-tzungbi@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
tools/testing/selftests/gpio/Makefile
tools/testing/selftests/gpio/gpio-cdev-uaf.c [new file with mode: 0644]
tools/testing/selftests/gpio/gpio-cdev-uaf.sh [new file with mode: 0755]