On Wed, Apr 9, 2025 at 8:54 PM Brian Norris <briannorris@xxxxxxxxxxxx> wrote: > > From: Brian Norris <briannorris@xxxxxxxxxx> > > It's possible to trigger use-after-free here by: > (a) forcing rescan_work_func() to take a long time and > (b) utilizing a pwrctrl driver that may be unloaded for some reason. > > I'm unlucky to trigger both of these in development. It's likely much > more difficult to hit this in practice. > > Anyway, we should ensure our work is finished before we allow our data > structures to be cleaned up. > > Fixes: 8f62819aaace ("PCI/pwrctl: Rescan bus on a separate thread") > Cc: Konrad Dybcio <konradybcio@xxxxxxxxxx> > Cc: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> > Signed-off-by: Brian Norris <briannorris@xxxxxxxxxx> > Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx> > --- > Sorry, it fell off my radar. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>