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: <CAJZ5v0iaR1e6OMpY=wMBKhqg8F6DAX5KUqa+YACEr0z3EZxo-w@mail.gmail.com>
Date: Mon, 21 Oct 2024 13:49:14 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>, linux-pm@...r.kernel.org, 
	"Rafael J. Wysocki" <rjw@...ysocki.net>, LKML <linux-kernel@...r.kernel.org>, 
	Daniel Lezcano <daniel.lezcano@...aro.org>, Lukasz Luba <lukasz.luba@....com>, 
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>, Zhang Rui <rui.zhang@...el.com>
Subject: Re: [PATCH v2 01/11] thermal: core: Add and use thermal zone guard

On Mon, Oct 21, 2024 at 1:41 PM Markus Elfring <Markus.Elfring@....de> wrote:
>
> …
> > +++ linux-pm/drivers/thermal/thermal_helpers.c
> > @@ -60,13 +60,13 @@ bool thermal_trip_is_bound_to_cdev(struc
> >  {
> >       bool ret;
> >
> > -     mutex_lock(&tz->lock);
> > +     guard(thermal_zone)(tz);
> > +
> >       mutex_lock(&cdev->lock);
> >
> >       ret = thermal_instance_present(tz, cdev, trip);
> >
> >       mutex_unlock(&cdev->lock);
> > -     mutex_unlock(&tz->lock);
> >
> >       return ret;
> >  }
> …
>
> Would you become interested to apply a statement
> like “guard(mutex)(&cdev->lock);”?

Well, please see
https://lore.kernel.org/linux-pm/5837621.DvuYhMxLoT@rjwysocki.net/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ