Skip to content

thermal: sysfs: add locking

Eduardo Valentin linux-acpi linux-omap linux-pm lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15thermal: sysfs: lock tz in type_showdrivers/thermal/thermal_sysfs.c+6 -10 replies
2/15thermal: sysfs: lock tz while on access to mode propertiesdrivers/thermal/thermal_sysfs.c+10 -319 replies
3/15thermal: sysfs: lock tz while on trip_point_type propertiesdrivers/thermal/thermal_sysfs.c+2 -00 replies
4/15thermal: sysfs: lock tz while on trip_point_temp propertiesdrivers/thermal/thermal_sysfs.c+4 -00 replies
5/15thermal: sysfs: lock tz while on trip_point_hyst propertiesdrivers/thermal/thermal_sysfs.c+4 -00 replies
6/15thermal: sysfs: lock tz while on passive propertiesdrivers/thermal/thermal_sysfs.c+14 -10 replies
7/15thermal: sysfs: lock tz while on policy propertiesdrivers/thermal/thermal_sysfs.c+7 -10 replies
8/15thermal: sysfs: improve locking of emul_temp_store()drivers/thermal/thermal_sysfs.c+4 -50 replies
9/15thermal: sysfs: lock tz when access sustainable power propertiesdrivers/thermal/thermal_sysfs.c+8 -10 replies
10/15thermal: sysfs: lock tz when access tzp propertiesdrivers/thermal/thermal_sysfs.c+10 -30 replies
11/15thermal: sysfs: lock cdev while accessing typedrivers/thermal/thermal_sysfs.c include/linux/thermal.h+7 -20 replies
12/15thermal: sysfs: lock cdev while accessing max_statedrivers/thermal/thermal_sysfs.c+2 -00 replies
13/15thermal: sysfs: lock cdev while accessing cur_statedrivers/thermal/thermal_sysfs.c+4 -00 replies
14/15thermal: sysfs: serialize access to instancesdrivers/thermal/thermal_sysfs.c+18 -20 replies
15/15thermal: sysfs: add comments describing locking strategydrivers/thermal/thermal_sysfs.c+15 -10 replies

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by.

PatchKeerthy
SeriesT-b
1/15
2/15T-b
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/15] thermal: sysfs: add locking

Hello,

Several thermal sysfs entries are currently being called from userspace without locking. Data and calls to ops are accessed deliberated without any care for locking.

This patch series attempts to fix this.

Now that sysfs handlers are on the same place it is easier to visualize this issue and fix it. The strategy is essentially to lock any access. Also, functions in thermal core and thermal helpers are assumed to do the proper locking already.

This patch series is based on the thermal core reorganization.

There is no change in the ABI to userspace. The difference is that now serialization to data will be done.

For your consideration, I am also adding this to this branch:
git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal sysfs_locking

Comments are welcome.

BR,

Eduardo Valentin (15):
thermal: sysfs: lock tz in type_show
thermal: sysfs: lock tz while on access to mode properties
thermal: sysfs: lock tz while on trip_point_type properties
thermal: sysfs: lock tz while on trip_point_temp properties
thermal: sysfs: lock tz while on trip_point_hyst properties
thermal: sysfs: lock tz while on passive properties
thermal: sysfs: lock tz while on policy properties
thermal: sysfs: improve locking of emul_temp_store()
thermal: sysfs: lock tz when access sustainable power properties
thermal: sysfs: lock tz when access tzp properties
thermal: sysfs: lock cdev while accessing type
thermal: sysfs: lock cdev while accessing max_state
thermal: sysfs: lock cdev while accessing cur_state
thermal: sysfs: serialize access to instances
thermal: sysfs: add comments describing locking strategy

 drivers/thermal/thermal_sysfs.c | 133 ++++++++++++++++++++++++++++++++++------
 include/linux/thermal.h         |   2 +-
 2 files changed, 115 insertions(+), 20 deletions(-)
Signature · 1 line
2.1.4