Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] power: sequencing: fix use-after-free in pwrseq-pcie-m2
@ 2026-11-05  8:28 Bartosz Golaszewski
  2026-11-05  8:28 ` [PATCH v2 1/2] power: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable() Bartosz Golaszewski
  2026-11-05  8:28 ` [PATCH v2 2/2] power: sequencing: pcie-m2: use devm_mutex_init() Bartosz Golaszewski
  0 siblings, 2 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-11-05  8:28 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Bartosz Golaszewski
  Cc: Manivannan Sadhasivam, linux-pci, linux-pm, linux-kernel,
	Bartosz Golaszewski, stable

This fixes a use-after-free bug reported by sashiko and then cleans up
the error path in probe() by switching to using devm_mutex_init() and
dropping the remaining goto labels.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Changes in v2:
- Assign ctx->num_vregs before scheduling the devres action
- Link to v1: https://patch.msgid.link/20261104-pwrseq-pcie-m2-uaf-v1-1-0ae1bbea9533@oss.qualcomm.com

---
Bartosz Golaszewski (2):
      power: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable()
      power: sequencing: pcie-m2: use devm_mutex_init()

 drivers/power/sequencing/pwrseq-pcie-m2.c | 53 ++++++++++++++-----------------
 1 file changed, 24 insertions(+), 29 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261104-pwrseq-pcie-m2-uaf-a10209c3c4d7

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


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

end of thread, other threads:[~2026-11-05  8:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05  8:28 [PATCH v2 0/2] power: sequencing: fix use-after-free in pwrseq-pcie-m2 Bartosz Golaszewski
2026-11-05  8:28 ` [PATCH v2 1/2] power: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable() Bartosz Golaszewski
2026-11-05  8:38   ` sashiko-bot
2026-11-05  8:28 ` [PATCH v2 2/2] power: sequencing: pcie-m2: use devm_mutex_init() Bartosz Golaszewski
2026-11-05  8:39   ` sashiko-bot

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