android_kernel_motorola_sm6375/drivers/ptp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas Weißschuh fdc1e72487 ptp: Ensure info->enable callback is always set
commit fd53aa40e65f518453115b6f56183b0c201db26b upstream.

The ioctl and sysfs handlers unconditionally call the ->enable callback.
Not all drivers implement that callback, leading to NULL dereferences.
Example of affected drivers: ptp_s390.c, ptp_vclock.c and ptp_mock.c.

Instead use a dummy callback if no better was specified by the driver.

Fixes: d94ba80ebb ("ptp: Added a brand new class driver for ptp clocks.")
Cc: [email protected]
Signed-off-by: Thomas Weißschuh <[email protected]>
Acked-by: Richard Cochran <[email protected]>
Reviewed-by: Michal Swiatkowski <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-03-13 12:43:11 +01:00
..
Kconfig
Makefile
ptp_chardev.c ptp: Fix error message on failed pin verification 2024-07-05 09:08:11 +02:00
ptp_clock.c ptp: Ensure info->enable callback is always set 2025-03-13 12:43:11 +01:00
ptp_dte.c
ptp_ixp46x.c
ptp_kvm.c
ptp_pch.c
ptp_private.h
ptp_qoriq.c
ptp_qoriq_debugfs.c
ptp_sysfs.c