]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jan 2023 12:17:42 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:48 +0000 (08:34 +0100)
commit9c965fbb7409f805bd2781c75d20465df8c44a6b
tree41c9b0dda164b3871f9c4def13c6f00002b2531d
parentd1c0ca67a48eff54ff0945d23880d54a3485c082
thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()

[ Upstream commit ef3d3b8deca34624cae25e64f00368c00e76020f ]

In order to prevent int340x_thermal_get_trip_type() from possibly
racing with int340x_thermal_read_trips() invoked by int3403_notify()
add locking to it in analogy with int340x_thermal_get_trip_temp().

Fixes: 62f4dec1d321 ("thermal: intel: int340x: Protect trip temperature from concurrent updates")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c