From: Wolfram Sang <wsa@the-dreams.de>
To: "Adamski, Krzysztof (Nokia - PL/Wroclaw)" <krzysztof.adamski@nokia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] hwmon: pmbus: protect read-modify-write with lock
Date: Sat, 8 Jun 2019 00:32:18 +0200 [thread overview]
Message-ID: <20190607223217.GE869@kunai> (raw)
In-Reply-To: <20190528090746.GA31184@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 661 bytes --]
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?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-06-07 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 9:08 [PATCH] hwmon: pmbus: protect read-modify-write with lock Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-06-07 22:32 ` Wolfram Sang [this message]
2019-06-10 6:36 ` Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-06-10 7:04 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190607223217.GE869@kunai \
--to=wsa@the-dreams.de \
--cc=krzysztof.adamski@nokia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).