lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hwmon: pmbus: protect read-modify-write with lock
On Tue, May 28, 2019 at 09:08:21AM +0000, Adamski, Krzysztof (Nokia - PL/Wroclaw) wrote:
> The operation done in the pmbus_update_fan() function is a
> read-modify-write operation but it lacks any kind of lock protection
> which may cause problems if run more than once simultaneously. This
> patch uses an existing update_lock mutex to fix this problem.
>
> Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>

Please use get_maintainer to find the people responsible for this file.
It is not my realm.

> +out:
> + mutex_lock(&data->update_lock);

Despite the above, have you tested the code? This likely should be
mutex_unlock?

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-06-08 00:32    [W:0.093 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site