Re: [PATCH net 2/2] net: pse-pd: guard against freed PI data on regulator disable

From: Carlo Szelinsky

Date: Sun Jun 28 2026 - 11:32:13 EST


Hi Simon,

Gentle ping on this one... I think I'm just waiting on your read before
I send v2, and I'd like to get it unblocked :-)

v2 would take pcdev->lock around the kfree() + pcdev->pi = NULL in
pse_release_pis() so the NULL is authoritative, and add the same
!pcdev->pi guard to pse_pi_is_enabled() and pse_pi_enable().

Two things I'd value your view on before I send the next version:

- Is the contained fix (lock around the free) ok, or would you prefer
the regulator unregister reordered ahead of pse_release_pis()?

- I couldn't find a concrete consumer hitting a regulator op on
another CPU during unbind, so I'd describe it as a narrow window
rather than a proven race. Does that sound right to you?

Happy to just send v2 with the lock fix if that works for you.

Thanks,
Carlo