]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: cdev: check if uAPI v2 config attributes are correctly zeroed
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Thu, 21 May 2026 08:42:16 +0000 (10:42 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Thu, 21 May 2026 10:00:04 +0000 (12:00 +0200)
commit3e6ccd790ed69bedd3d9626d01dd35cf9821c121
tree64f031a779f6053e95e88c3dea2476b29ddaa354
parentbe460cedb67ab803c1bebceac19b1d44acb85d30
gpio: cdev: check if uAPI v2 config attributes are correctly zeroed

We check the padding of other uAPI v2 structures but not that of line
config attributes. For used attributes: check if their padding is
zeroed, for unused: check if the entire structure is zeroed.

Fixes: 3c0d9c635ae2 ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL")
Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://patch.msgid.link/20260521-gpio-cdev-attr-padding-check-v3-1-ec3bcbe2e358@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib-cdev.c