Module Name: src
Committed By: riastradh
Date: Sun Jun 23 20:47:17 UTC 2024
Modified Files:
src/sys/arch/xen/xen: xen_clock.c
Log Message:
xen_rtc_set: Zero-initialize op before passing to hypervisor.
PR port-xen/58362
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/xen/xen/xen_clock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/xen/xen_clock.c
diff -u src/sys/arch/xen/xen/xen_clock.c:1.18 src/sys/arch/xen/xen/xen_clock.c:1.19
--- src/sys/arch/xen/xen/xen_clock.c:1.18 Sun Sep 10 15:23:01 2023
+++ src/sys/arch/xen/xen/xen_clock.c Sun Jun 23 20:47:17 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_clock.c,v 1.18 2023/09/10 15:23:01 bouyer Exp $ */
+/* $NetBSD: xen_clock.c,v 1.19 2024/06/23 20:47:17 riastradh Exp $ */
/*-
* Copyright (c) 2017, 2018 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_clock.c,v 1.18 2023/09/10 15:23:01 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_clock.c,v 1.19 2024/06/23 20:47:17 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1106,6 +1106,7 @@ xen_rtc_set(struct todr_chip_handle *tod
systime_ns = xen_global_systime_ns();
/* Set the hypervisor wall clock time. */
+ memset(&op, 0, sizeof(op));
op.cmd = XENPF_settime;
op.u.settime.secs = tvp->tv_sec;
op.u.settime.nsecs = tvp->tv_usec * 1000;