https://github.com/torvalds/linux
Revision 38463721ec3c39acdabed3a89016ce6bb32a7543 authored by Adamski, Krzysztof (Nokia - PL/Wroclaw) on 29 May 2019, 14:33:52 UTC, committed by Guenter Roeck on 06 June 2019, 01:36:27 UTC
update_lock is a mutex intended to protect write operations. It was not
taken, however, when _pmbus_write_word_data is called from
pmbus_set_samples() function which may cause problems especially when
some PMBUS_VIRT_* operation is implemented as a read-modify-write cycle.

This patch makes sure the lock is held during the operation.

Fixes: 49c4455dccf2 ("hwmon: (pmbus) Introduce PMBUS_VIRT_*_SAMPLES registers")
Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
[groeck: Declared and initialized missing 'data' variable]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent c41dd48
History
Tip revision: 38463721ec3c39acdabed3a89016ce6bb32a7543 authored by Adamski, Krzysztof (Nokia - PL/Wroclaw) on 29 May 2019, 14:33:52 UTC
hwmon: (pmbus/core) mutex_lock write in pmbus_set_samples
Tip revision: 3846372
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.6 KB
.mailmap -rw-r--r-- 11.9 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.2 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 563 bytes
MAINTAINERS -rw-r--r-- 499.9 KB
Makefile -rw-r--r-- 58.8 KB
README -rw-r--r-- 727 bytes

README

back to top