* [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP
@ 2025-11-26 9:48 Michal Schmidt
2025-11-26 10:03 ` Loktionov, Aleksandr
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal Schmidt @ 2025-11-26 9:48 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran,
Mateusz Polchlopek, Sai Krishna, Simon Horman, Jacob Keller
Cc: Tim Hostetler, Ahmed Zaki, intel-wired-lan, netdev, linux-kernel
ptp_clock_settime() assumes every ptp_clock has implemented settime64().
Stub it with -EOPNOTSUPP to prevent a NULL dereference.
The fix is similar to commit 329d050bbe63 ("gve: Implement settime64
with -EOPNOTSUPP").
Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP clock")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/intel/iavf/iavf_ptp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_ptp.c b/drivers/net/ethernet/intel/iavf/iavf_ptp.c
index b4d5eda2e84f..9cbd8c154031 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ptp.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ptp.c
@@ -252,6 +252,12 @@ static int iavf_ptp_gettimex64(struct ptp_clock_info *info,
return iavf_read_phc_indirect(adapter, ts, sts);
}
+static int iavf_ptp_settime64(struct ptp_clock_info *info,
+ const struct timespec64 *ts)
+{
+ return -EOPNOTSUPP;
+}
+
/**
* iavf_ptp_cache_phc_time - Cache PHC time for performing timestamp extension
* @adapter: private adapter structure
@@ -320,6 +326,7 @@ static int iavf_ptp_register_clock(struct iavf_adapter *adapter)
KBUILD_MODNAME, dev_name(dev));
ptp_info->owner = THIS_MODULE;
ptp_info->gettimex64 = iavf_ptp_gettimex64;
+ ptp_info->settime64 = iavf_ptp_settime64;
ptp_info->do_aux_work = iavf_ptp_do_aux_work;
clock = ptp_clock_register(ptp_info, dev);
--
2.51.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP
2025-11-26 9:48 [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP Michal Schmidt
@ 2025-11-26 10:03 ` Loktionov, Aleksandr
2025-11-26 17:39 ` Tim Hostetler
2025-11-28 2:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-26 10:03 UTC (permalink / raw)
To: Schmidt, Michal, Nguyen, Anthony L, Kitszel, Przemyslaw,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Richard Cochran, Mateusz Polchlopek, Sai Krishna,
Simon Horman, Keller, Jacob E
Cc: Tim Hostetler, Ahmed Zaki, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Michal Schmidt
> Sent: Wednesday, November 26, 2025 10:49 AM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>; David
> S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Richard Cochran
> <richardcochran@gmail.com>; Mateusz Polchlopek
> <mateusz.polchlopek@intel.com>; Sai Krishna <saikrishnag@marvell.com>; Simon
> Horman <horms@kernel.org>; Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: Tim Hostetler <thostet@google.com>; Ahmed Zaki <ahmed.zaki@intel.com>;
> intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -
> EOPNOTSUPP
>
> ptp_clock_settime() assumes every ptp_clock has implemented settime64().
> Stub it with -EOPNOTSUPP to prevent a NULL dereference.
>
> The fix is similar to commit 329d050bbe63 ("gve: Implement settime64 with -
> EOPNOTSUPP").
>
> Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP
> clock")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_ptp.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> b/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> index b4d5eda2e84f..9cbd8c154031 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> @@ -252,6 +252,12 @@ static int iavf_ptp_gettimex64(struct ptp_clock_info
> *info,
> return iavf_read_phc_indirect(adapter, ts, sts); }
>
> +static int iavf_ptp_settime64(struct ptp_clock_info *info,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> /**
> * iavf_ptp_cache_phc_time - Cache PHC time for performing timestamp
> extension
> * @adapter: private adapter structure
> @@ -320,6 +326,7 @@ static int iavf_ptp_register_clock(struct iavf_adapter
> *adapter)
> KBUILD_MODNAME, dev_name(dev));
> ptp_info->owner = THIS_MODULE;
> ptp_info->gettimex64 = iavf_ptp_gettimex64;
> + ptp_info->settime64 = iavf_ptp_settime64;
> ptp_info->do_aux_work = iavf_ptp_do_aux_work;
>
> clock = ptp_clock_register(ptp_info, dev);
> --
> 2.51.1
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP
2025-11-26 9:48 [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP Michal Schmidt
2025-11-26 10:03 ` Loktionov, Aleksandr
@ 2025-11-26 17:39 ` Tim Hostetler
2025-11-28 2:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tim Hostetler @ 2025-11-26 17:39 UTC (permalink / raw)
To: Michal Schmidt
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran,
Mateusz Polchlopek, Sai Krishna, Simon Horman, Jacob Keller,
Ahmed Zaki, intel-wired-lan, netdev, linux-kernel
On Wed, Nov 26, 2025 at 1:49 AM Michal Schmidt <mschmidt@redhat.com> wrote:
>
> ptp_clock_settime() assumes every ptp_clock has implemented settime64().
> Stub it with -EOPNOTSUPP to prevent a NULL dereference.
>
> The fix is similar to commit 329d050bbe63 ("gve: Implement settime64
> with -EOPNOTSUPP").
>
> Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP clock")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Tim Hostetler <thostet@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP
2025-11-26 9:48 [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP Michal Schmidt
2025-11-26 10:03 ` Loktionov, Aleksandr
2025-11-26 17:39 ` Tim Hostetler
@ 2025-11-28 2:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-28 2:10 UTC (permalink / raw)
To: Michal Schmidt
Cc: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem,
edumazet, kuba, pabeni, richardcochran, mateusz.polchlopek,
saikrishnag, horms, jacob.e.keller, thostet, ahmed.zaki,
intel-wired-lan, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 26 Nov 2025 10:48:49 +0100 you wrote:
> ptp_clock_settime() assumes every ptp_clock has implemented settime64().
> Stub it with -EOPNOTSUPP to prevent a NULL dereference.
>
> The fix is similar to commit 329d050bbe63 ("gve: Implement settime64
> with -EOPNOTSUPP").
>
> Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP clock")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
>
> [...]
Here is the summary with links:
- [net] iavf: Implement settime64 with -EOPNOTSUPP
https://git.kernel.org/netdev/net/c/1e43ebcd5152
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-01 16:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 9:48 [Intel-wired-lan] [PATCH net] iavf: Implement settime64 with -EOPNOTSUPP Michal Schmidt
2025-11-26 10:03 ` Loktionov, Aleksandr
2025-11-26 17:39 ` Tim Hostetler
2025-11-28 2:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).