From 42d25579fed675d3915205a98db65b7ba9f0aaca Mon Sep 17 00:00:00 2001 From: mvs Date: Sun, 3 Dec 2023 10:51:17 +0000 Subject: [PATCH] Make rtm_senddesync_timer() timeout(9) handler mpsafe. solock() protects the socket and the socket's PCB data. ok bluhm --- sys/net/rtsock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 0816eb7b00b..2dd04a0fd28 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.372 2023/11/12 17:51:41 bluhm Exp $ */ +/* $OpenBSD: rtsock.c,v 1.373 2023/12/03 10:51:17 mvs Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -234,7 +234,8 @@ route_attach(struct socket *so, int proto, int wait) return (ENOBUFS); so->so_pcb = rop; /* Init the timeout structure */ - timeout_set_proc(&rop->rop_timeout, rtm_senddesync_timer, so); + timeout_set_flags(&rop->rop_timeout, rtm_senddesync_timer, so, + KCLOCK_NONE, TIMEOUT_PROC | TIMEOUT_MPSAFE); refcnt_init(&rop->rop_refcnt); rop->rop_socket = so; -- 2.20.1