Skip to content

Commit 44d9b3f

Browse files
ian-abbottgregkh
authored andcommitted
comedi: jr3_pci: Fix synchronous deletion of timer
When `jr3_pci_detach()` is called during device removal, it calls `timer_delete_sync()` to stop the timer, but the timer expiry function always reschedules the timer, so the synchronization is ineffective. Call `timer_shutdown_sync()` instead. It does not matter that the timer expiry function pointer is cleared, because the device is being removed. Fixes: 07b509e ("Staging: comedi: add jr3_pci driver") Cc: stable <[email protected]> Signed-off-by: Ian Abbott <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 170d1a3 commit 44d9b3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/comedi/drivers/jr3_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedi_device *dev)
758758
struct jr3_pci_dev_private *devpriv = dev->private;
759759

760760
if (devpriv)
761-
timer_delete_sync(&devpriv->timer);
761+
timer_shutdown_sync(&devpriv->timer);
762762

763763
comedi_pci_detach(dev);
764764
}

0 commit comments

Comments
 (0)