diff options
author | Adamski, Krzysztof (Nokia - PL/Wroclaw) <krzysztof.adamski@nokia.com> | 2019-05-29 14:33:52 +0000 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-06-05 18:36:27 -0700 |
commit | 38463721ec3c39acdabed3a89016ce6bb32a7543 (patch) | |
tree | 4154a311c4aee5f43ada5b80fc0e148bec4c5b58 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | c41dd48e21fae3e55b3670ccf2eb562fc1f6a67d (diff) |
hwmon: (pmbus/core) mutex_lock write in pmbus_set_samples
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions