Module Name:    src
Committed By:   riastradh
Date:           Sun Jul 28 14:39:36 UTC 2024

Modified Files:
        src/sys/net: if_wg.c

Log Message:
wg(4): Mark wgp_pending volatile to reflect its usage.

Prompted by (but won't fix any part of):

PR kern/55729: net/if_wg/t_misc:wg_rekey test case fails
PR kern/56252: wg(4) state machine has race conditions
PR kern/58463: if_wg does not work when idle.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/net/if_wg.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/net/if_wg.c
diff -u src/sys/net/if_wg.c:1.98 src/sys/net/if_wg.c:1.99
--- src/sys/net/if_wg.c:1.98	Sun Jul 28 14:39:19 2024
+++ src/sys/net/if_wg.c	Sun Jul 28 14:39:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wg.c,v 1.98 2024/07/28 14:39:19 riastradh Exp $	*/
+/*	$NetBSD: if_wg.c,v 1.99 2024/07/28 14:39:35 riastradh Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki <ozaki.ry...@gmail.com>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.98 2024/07/28 14:39:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.99 2024/07/28 14:39:35 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq_enabled.h"
@@ -605,7 +605,7 @@ struct wg_peer {
 	struct wg_session	*wgp_session_unstable;
 
 	/* first outgoing packet awaiting session initiation */
-	struct mbuf		*wgp_pending;
+	struct mbuf		*volatile wgp_pending;
 
 	/* timestamp in big-endian */
 	wg_timestamp_t	wgp_timestamp_latest_init;

Reply via email to