lkml.org 
[lkml]   [2023]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] thermal: int340x: processor_thermal: Fix deadlock
On Fri, Mar 3, 2023 at 7:52 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Mar 03, 2023 at 08:19:09AM -0800, Srinivas Pandruvada wrote:
> > From: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
> >
> > When user space updates the trip point there is a deadlock, which results
> > in caller gets blocked forever.
> >
> > Commit 05eeee2b51b4 ("thermal/core: Protect sysfs accesses to thermal
> > operations with thermal zone mutex"), added a mutex for tz->lock in the
> > function trip_point_temp_store(). Hence, trip set callback() can't
> > call any thermal zone API as they are protected with the same mutex lock.
> >
> > The callback here calling thermal_zone_device_enable(), which will result
> > in deadlock.
> >
> > Move the thermal_zone_device_enable() to proc_thermal_pci_probe() to
> > avoid this deadlock.
> >
> > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
> > Cc: stable@vger.kernel.org
> > ---
> > The commit which caused this issue was added during v6.2 cycle.
>
> What commit exactly? Always list that as a Fixes: tag if you know this.

It's there in the changelog above.

I'll add a Fixes: tag to this one when applying it.

Cheers!

\
 
 \ /
  Last update: 2023-03-27 00:43    [W:0.388 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site