aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/amba/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorAbdurrahman Hussain <abdurrahman@nexthop.ai>2026-05-18 17:52:28 -0700
committerGuenter Roeck <linux@roeck-us.net>2026-05-21 07:00:03 -0700
commit491403b9b76cf66abd81301c5901aa4a4549f1e8 (patch)
treed41dbbd59555114a1015246885d00095a5b58551 /include/linux/amba/ssh:/git@git.zx2c4.com
parenthwmon: (pmbus/adm1266) reject short block-read responses in the GPIO accessors (diff)
hwmon: (pmbus/adm1266) register the gpio_chip after pmbus_do_probe()
adm1266_probe() calls adm1266_config_gpio() -- which goes on to devm_gpiochip_add_data() and exposes the gpio_chip callbacks to gpiolib -- before pmbus_do_probe() has initialised the per-client PMBus state (notably the pmbus_lock mutex the core hands out via pmbus_get_data()). That ordering is already a latent hazard: any GPIO access that lands between adm1266_config_gpio() and the end of pmbus_do_probe() (for example a sysfs read from a user space agent that opens the gpiochip the instant gpiolib advertises it) races pmbus_do_probe()'s own device accesses with no serialisation. Move adm1266_config_gpio() down past pmbus_do_probe() so the chip isn't reachable from userspace until the PMBus state it depends on is fully initialised. Fixes: d98dfad35c38 ("hwmon: (pmbus/adm1266) Add support for GPIOs") Cc: stable@vger.kernel.org Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260518-adm1266-gpio-fixes-v3-4-e425e4f88139@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/linux/amba/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions