WSL2-Linux-Kernel/drivers/hwmon/occ
Eddie James 8848842f0a hwmon: (occ) Prevent power cap command overwriting poll response
[ Upstream commit 1bbb280904 ]

Currently, the response to the power cap command overwrites the
first eight bytes of the poll response, since the commands use
the same buffer. This means that user's get the wrong data between
the time of sending the power cap and the next poll response update.
Fix this by specifying a different buffer for the power cap command
response.

Fixes: 5b5513b880 ("hwmon: Add On-Chip Controller (OCC) hwmon driver")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220628203029.51747-1-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-07 17:53:35 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
common.c hwmon: (occ) Prevent power cap command overwriting poll response 2022-07-07 17:53:35 +02:00
common.h hwmon: (occ) Prevent power cap command overwriting poll response 2022-07-07 17:53:35 +02:00
p8_i2c.c hwmon: (occ) Prevent power cap command overwriting poll response 2022-07-07 17:53:35 +02:00
p9_sbe.c hwmon: (occ) Prevent power cap command overwriting poll response 2022-07-07 17:53:35 +02:00
sysfs.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00