kernel_samsung_a53x/drivers/hwmon
Aleksa Savic 1632c68ef1 hwmon: (corsair-cpro) Use a separate buffer for sending commands
[ Upstream commit e0cd85dc666cb08e1bd313d560cb4eff4d04219e ]

Introduce cmd_buffer, a separate buffer for storing only
the command that is sent to the device. Before this separation,
the existing buffer was shared for both the command and the
report received in ccp_raw_event(), which was copied into it.

However, because of hidraw, the raw event parsing may be triggered
in the middle of sending a command, resulting in outputting gibberish
to the device. Using a separate buffer resolves this.

Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Acked-by: Marius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20240504092504.24158-2-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 11:32:45 +01:00
..
occ Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abituguru.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abituguru3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abx500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abx500.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_power_meter.c hwmon: (acpi_power_meter) Fix 4.29 MW bug 2024-11-18 12:11:41 +01:00
ad7314.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7414.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7418.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adc128d818.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adcxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1021.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1025.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1026.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1029.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1031.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1177.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm9240.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ads7828.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ads7871.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7x10.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7x10.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7310.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7410.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7411.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7462.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7470.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adt7475.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amc6821.c hwmon: (amc6821) add of_match table 2024-11-19 09:22:33 +01:00
amd_energy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applesmc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
as370-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asb100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asc7621.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspeed-pwm-tacho.c hwmon: (aspeed-pwm-tacho) mutex for tach reading 2024-11-18 12:13:24 +01:00
asus_atk0110.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atxp1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axi-fan-control.c hwmon: (axi-fan-control) Fix possible NULL pointer dereference 2024-11-18 11:42:55 +01:00
bt1-pvt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bt1-pvt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coretemp.c hwmon: (coretemp) Enlarge per package core count limit 2024-11-18 22:25:34 +01:00
corsair-cpro.c hwmon: (corsair-cpro) Use a separate buffer for sending commands 2024-11-19 11:32:45 +01:00
da9052-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9055-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dell-smm-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dme1737.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drivetemp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds620.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds1621.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emc6w201.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emc1403.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emc2103.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_ntc_thermistor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f71805f.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f71882fg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f75375s.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fam15h_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fschmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftsteutates.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
g760a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
g762.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gl518sm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gl520sm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio-fan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gsc-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hih6130.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwmon-vid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i5k_amb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i5500_temp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibmaem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibmpex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibmpowernv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio_hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ina2xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ina209.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ina3221.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel-m10-bmc-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
it87.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jc42.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
k8temp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
k10temp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lineage-pem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm63.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm70.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm73.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm75.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm75.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm77.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm78.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm80.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm83.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm85.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm87.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm90.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm92.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm93.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm95234.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm95241.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm95245.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lochnagar-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2945.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2947-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2947-i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2947-spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2947.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2990.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4151.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4215.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4222.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4245.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4260.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc4261.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltq-cputemp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max197.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1111.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1619.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1668.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max6621.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max6639.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max6642.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max6650.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max6697.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max16065.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max31722.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max31730.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max31790.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mc13783-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp3021.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
menf21bmc_hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlxreg-fan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mr75203.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nct6683.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nct6775.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nct7802.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nct7904.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
npcm750-pwm-fan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsa320-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ntc_thermistor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc87360.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc87427.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcf8591.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powr1220.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pwm-fan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raspberrypi-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch56xx-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch56xx-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch5627.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch5636.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scmi-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scpi-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sht3x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sht15.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sht21.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
shtc1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sis5595.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sl28cpld-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smm665.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc47b397.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc47m1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc47m192.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sparx5-temp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stts751.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc74.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc654.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
thmc50.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp102.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp103.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp108.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp401.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp421.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmp513.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ultra45_env.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vexpress-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-cputemp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via686a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt1211.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt8231.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83l785ts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83l786ng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83627ehf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83627hf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83773g.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83781d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83791d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83792d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83793.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w83795.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm831x-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm8350-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xgene-hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00