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
| ||
|
Message-ID: <d79dbfae-d50b-45e5-b430-be8106bbb03c@web.de> Date: Sat, 7 Sep 2024 10:10:07 +0200 From: Markus Elfring <Markus.Elfring@....de> To: Junhao Xie <bigfoot@...ssfun.cn>, devicetree@...r.kernel.org, linux-hwmon@...r.kernel.org, linux-leds@...r.kernel.org, linux-pm@...r.kernel.org, linux-rtc@...r.kernel.org, linux-watchdog@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org Cc: LKML <linux-kernel@...r.kernel.org>, Alexandre Belloni <alexandre.belloni@...tlin.com>, Chukun Pan <amadeus@....edu.cn>, Conor Dooley <conor+dt@...nel.org>, Günter Röck <linux@...ck-us.net>, Heiko Stübner <heiko@...ech.de>, Jean Delvare <jdelvare@...e.com>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>, Pavel Machek <pavel@....cz>, Rob Herring <robh@...nel.org>, Sebastian Reichel <sre@...nel.org>, Wim Van Sebroeck <wim@...ux-watchdog.org> Subject: Re: [PATCH 1/9] mfd: Add driver for Photonicat power management MCU … > +++ b/drivers/mfd/photonicat-pmu.c > @@ -0,0 +1,501 @@ … > +int pcat_pmu_execute(struct pcat_request *request) > +{ … Under which circumstances would you become interested to apply statements like the following? > + mutex_lock(&pmu->reply_lock); > + if (request->frame_id == 0) > + request->frame_id = atomic_inc_return(&pmu->frame); > + pmu->reply = request; > + mutex_unlock(&pmu->reply_lock); … A) guard(mutex)(&pmu->reply_lock); https://elixir.bootlin.com/linux/v6.11-rc6/source/include/linux/mutex.h#L196 > + spin_lock_irqsave(&pmu->bus_lock, flags); > + ret = pcat_pmu_raw_write(pmu, request->frame_id, req->cmd, > + true, req->data, req->size); > + spin_unlock_irqrestore(&pmu->bus_lock, flags); … B) guard(spinlock_irqsave)(&pmu->bus_lock); https://elixir.bootlin.com/linux/v6.11-rc6/source/include/linux/spinlock.h#L572 Regards, Markus
Powered by blists - more mailing lists