[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190607223217.GE869@kunai>
Date: Sat, 8 Jun 2019 00:32:18 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: "Adamski, Krzysztof (Nokia - PL/Wroclaw)"
<krzysztof.adamski@...ia.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>
Subject: Re: [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@...ia.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?
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists