From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30047221719; Tue, 29 Apr 2025 17:09:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946541; cv=none; b=oe6lKvGT375RmhxMgPPg4fH2cv3x83f4tBt4OO5Df9MydLvu+V0u0pAUDjG6prRznD0Gxnynj+z5Vwu5F98fK+IHJfPS12v15hyKUG+LPTHc2Asho/P3L/iXNT9t1Nlw81FIcgkDEAj94TZAQ1QYYzW+vMyiS43csFfuc+mABlg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946541; c=relaxed/simple; bh=k5rWxaHvnZ1VkkQFeETLUFjXfAG4AQrfFZHX4+KD678=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J2P/T8zhaI9Erpa9u05cbxvKoHyN8UuUtBYvNi9ZGdVVZju1FkTBiTCbR5LmHKXcqEtIltRDcfd9Rji7mbss35w2a252Y4KZYTGnXE8coJl2Aagb5xQx39zH79BwZfQH+n5Sr4who9mKBbT2Xgz+yc9n/7RV9D81oDNVuVzkyvM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FUNkcebf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FUNkcebf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94C28C4CEE3; Tue, 29 Apr 2025 17:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745946541; bh=k5rWxaHvnZ1VkkQFeETLUFjXfAG4AQrfFZHX4+KD678=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUNkcebfYof9oq3Mq/liTQVL7Bj5ft4k9Tx7901zMdlS+oMgSlDX0rcc63eG0P/ua s26xUFZfcNzJRslzPsPNnID3EgtU+SGhp72z1L2CmKhBLhgSbgGB9QXU+VUbzDFM9V 2kTtFoN9n7C0oT7y0kcNjHJF3XKYCOYFIlsnmycU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Ian Abbott Subject: [PATCH 6.14 300/311] comedi: jr3_pci: Fix synchronous deletion of timer Date: Tue, 29 Apr 2025 18:42:17 +0200 Message-ID: <20250429161133.289415242@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161121.011111832@linuxfoundation.org> References: <20250429161121.011111832@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ian Abbott commit 44d9b3f584c59a606b521e7274e658d5b866c699 upstream. 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: 07b509e6584a5 ("Staging: comedi: add jr3_pci driver") Cc: stable Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250415123901.13483-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman --- drivers/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/comedi/drivers/jr3_pci.c +++ b/drivers/comedi/drivers/jr3_pci.c @@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedi struct jr3_pci_dev_private *devpriv = dev->private; if (devpriv) - del_timer_sync(&devpriv->timer); + timer_shutdown_sync(&devpriv->timer); comedi_pci_detach(dev); }