milos-linux/drivers/ptp
Vadim Fedorenko 627366c511 ptp: ocp: fix resource freeing order
Commit a60fc3294a ("ptp: rework ptp_clock_unregister() to disable
events") added a call to ptp_disable_all_events() which changes the
configuration of pins if they support EXTTS events. In ptp_ocp_detach()
pins resources are freed before ptp_clock_unregister() and it leads to
use-after-free during driver removal. Fix it by changing the order of
free/unregister calls. To avoid irq handler running on the other core
while ptp device unregistering, call synchronize_irq() after HW is
configured to stop producing irqs and no irqs are in-flight.

Fixes: a60fc3294a ("ptp: rework ptp_clock_unregister() to disable events")
Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20260608155952.240304-1-vadim.fedorenko@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-09 19:26:56 -07:00
..
Kconfig ptp: ptp_vmclock: remove dependency on CONFIG_ACPI 2026-02-02 18:06:01 -08:00
Makefile ptp: qoriq: convert to use generic interfaces to set loopback mode 2025-09-09 19:28:52 -07:00
ptp_chardev.c ptp: Allow exposing cycles only for clocks with free-running counter 2025-10-31 16:27:40 -07:00
ptp_clock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_clockmatrix.c ptp: ptp_clockmatrix: Remove redundant semicolons 2025-08-14 17:35:49 -07:00
ptp_clockmatrix.h
ptp_dfl_tod.c
ptp_dte.c
ptp_fc3.c
ptp_fc3.h
ptp_idt82p33.c
ptp_idt82p33.h
ptp_ines.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_kvm_arm.c
ptp_kvm_common.c
ptp_kvm_x86.c
ptp_mock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_netc.c ptp: netc: only enable periodic pulse event interrupts for PPS 2025-09-17 15:18:58 -07:00
ptp_ocp.c ptp: ocp: fix resource freeing order 2026-06-09 19:26:56 -07:00
ptp_pch.c kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
ptp_private.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-10-01 10:14:49 +02:00
ptp_qoriq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_s390.c
ptp_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_vclock.c ptp: vclock: Switch from RCU to SRCU 2026-06-03 18:58:54 -07:00
ptp_vmclock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp_vmw.c ptp: vmw: Convert to a platform driver 2026-03-17 19:06:19 -07:00