mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power: sequencing: core: add a note on descriptor serialization
@ 2026-11-05 15:55 Bartosz Golaszewski
  2026-11-06  3:02 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-11-05 15:55 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: linux-pm, linux-kernel, Bartosz Golaszewski

Sashiko reported a race in pwrseq_enable/disable() which is a false
positive. The descriptor structures are not synchronized by power
sequencing core. Instead: the user that requested a descriptor is
responsible for serializing access to it. Add a note to the kerneldoc.

Closes: https://sashiko.dev/#/bug/linux-d409bd5b-8a5d-485d-aa53-cbc9ddeb8436
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/power/sequencing/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/power/sequencing/core.c b/drivers/power/sequencing/core.c
index d7a545bb4ed2e22897843f4a81c337deb0c28062..588c6da12acbe942eb5b918e36be11b855c79e2b 100644
--- a/drivers/power/sequencing/core.c
+++ b/drivers/power/sequencing/core.c
@@ -270,6 +270,11 @@ static void pwrseq_device_put(struct pwrseq_device *pwrseq)
  * @target: Reference to the target this descriptor allows to control.
  * @powered_on: Power state set by the holder of the descriptor (not necessarily
  * corresponding to the actual power state of the device).
+ *
+ * @note: The user that requested the descriptor from the provider is
+ * responsible for the serialization of access to it. Concurrent threads must
+ * not access the descriptor structure without synchronization as power
+ * sequencing core does not provide any per-descriptor locking.
  */
 struct pwrseq_desc {
 	struct pwrseq_device *pwrseq;

---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20261105-pwrseq-core-desc-kerneldoc-7d81c4a633ef

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] power: sequencing: core: add a note on descriptor serialization
  2026-11-05 15:55 [PATCH] power: sequencing: core: add a note on descriptor serialization Bartosz Golaszewski
@ 2026-11-06  3:02 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-11-06  3:02 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bartosz Golaszewski
  Cc: oe-kbuild-all, linux-pm, linux-kernel

Hi Bartosz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b]

url:    https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/power-sequencing-core-add-a-note-on-descriptor-serialization/20261105-165511
base:   ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
patch link:    https://lore.kernel.org/r/20261105-pwrseq-core-desc-kerneldoc-v1-1-e10a2b03ce1f%40oss.qualcomm.com
patch subject: [PATCH] power: sequencing: core: add a note on descriptor serialization
config: arc-randconfig-1000-20261106 (https://download.01.org/0day-ci/archive/20261106/202611061108.IT0tUaIe-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261106/202611061108.IT0tUaIe-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611061108.IT0tUaIe-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> Warning: drivers/power/sequencing/core.c:282 Excess struct member 'note' description in 'pwrseq_desc'
>> Warning: drivers/power/sequencing/core.c:282 Excess struct member 'note' description in 'pwrseq_desc'

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-06  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 15:55 [PATCH] power: sequencing: core: add a note on descriptor serialization Bartosz Golaszewski
2026-11-06  3:02 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®