diff options
| author | Adamski, Krzysztof (Nokia - PL/Wroclaw) <[email protected]> | 2019-05-29 14:33:52 +0000 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2019-06-06 01:36:27 +0000 |
| commit | 38463721ec3c39acdabed3a89016ce6bb32a7543 (patch) | |
| tree | 4154a311c4aee5f43ada5b80fc0e148bec4c5b58 /fs/proc/array.c | |
| parent | hwmon: (core) add thermal sensors only if dev->of_node is present (diff) | |
| download | kernel-38463721ec3c39acdabed3a89016ce6bb32a7543.tar.gz kernel-38463721ec3c39acdabed3a89016ce6bb32a7543.zip | |
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 <[email protected]>
Reviewed-by: Alexander Sverdlin <[email protected]>
[groeck: Declared and initialized missing 'data' variable]
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
