В ядре Linux устранена следующая уязвимость:
iio: свет: gp2ap002: исправлена утечка PM во время выполнения при ошибке чтения
gp2ap002_read_raw() вызывает pm_runtime_get_sync() перед чтением
lux, но если gp2ap002_get_lux() завершается неудачно, он возвращается напрямую. Это
пропускает вызов pm_runtime_put_autosuspend() на метке «out»,
постоянная утечка ссылки на PM во время выполнения и предотвращение устройства
от автоприостановки.
Замените прямой возврат на «goto out», чтобы обеспечить ссылку.
правильно отбрасывается на путь ошибки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: iio: light: gp2ap002: fix runtime PM leak on read error gp2ap002_read_raw() calls pm_runtime_get_sync() before reading the lux value, but if gp2ap002_get_lux() fails, it returns directly. This skips the pm_runtime_put_autosuspend() call at the "out" label, permanently leaking a runtime PM reference and preventing the device from autosuspending. Replace the direct return with a "goto out" to ensure the reference is properly dropped on the error path.