Subject: Re: [PATCH net 0/2] gve: Fix NULL dereferencing with PTP clock

From: Simon Horman <[email-masked]>
Date: Thu, 30 Oct 2025 09:43:54 +0000

On Wed, Oct 29, 2025 at 11:45:38AM -0700, Joshua Washington wrote:
> From: Tim Hostetler <[email-masked]>
> 
> This patch series fixes NULL dereferences that are possible with gve's
> PTP clock due to not stubbing certain ptp_clock_info callbacks.
> 
> Tim Hostetler (2):
>   gve: Implement gettimex64 with -EOPNOTSUPP
>   gve: Implement settime64 with -EOPNOTSUPP
> 
>  drivers/net/ethernet/google/gve/gve_ptp.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Hi Joshua and Tim,

I think that the approach of enhancing the caller to only
call these callbacks if they are non NULL, as per the patch below,
seems more robust. It would fix all drivers in one go.

- [PATCH] ptp: guard ptp_clock_gettime() if neither gettimex64 nor
  https://lore.kernel.org/all/[email-masked]/