lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <503b7ec9-e0b1-4351-aa34-3089b2055eb9@linaro.org>
Date: Mon, 10 Feb 2025 08:59:04 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: Markus Elfring <Markus.Elfring@....de>, devicetree@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
 Alim Akhtar <alim.akhtar@...sung.com>, Conor Dooley <conor+dt@...nel.org>,
 Jassi Brar <jassisinghbrar@...il.com>, Krzysztof Kozlowski <krzk@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-team@...roid.com,
 André Draszik <andre.draszik@...aro.org>,
 Arnd Bergmann <arnd@...db.de>, Daniel Lezcano <daniel.lezcano@...aro.org>,
 Peter Griffin <peter.griffin@...aro.org>, Rob Herring <robh@...nel.org>,
 Ulf Hansson <ulf.hansson@...aro.org>,
 Vincent Guittot <vincent.guittot@...aro.org>,
 Will McVicker <willmcvicker@...gle.com>
Subject: Re: [PATCH v7 2/3] firmware: add Exynos ACPM protocol driver



On 2/8/25 3:31 PM, Markus Elfring wrote:
> …
>> +++ b/drivers/firmware/samsung/exynos-acpm.c
>> @@ -0,0 +1,771 @@
> …
>> +static int acpm_dequeue_by_polling(struct acpm_chan *achan,
>> +				   const struct acpm_xfer *xfer)
>> +{
> …
>> +	do {
>> +		mutex_lock(&achan->rx_lock);
>> +		ret = acpm_get_rx(achan, xfer);
>> +		mutex_unlock(&achan->rx_lock);
> …
> 
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&achan->rx_lock);”?
> https://elixir.bootlin.com/linux/v6.13.1/source/include/linux/mutex.h#L201

I'll replace the open-coded mutex handling with cleanup.h guard(mutex)
and scoped_guard(mutex, ...), thanks.

Cheers,
ta

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ