diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-08-01 17:19:02 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-08-01 17:19:02 +0000 |
commit | 111584bb2667d80965a2d93ec5ea58b828cded2d (patch) | |
tree | 24d22af6e0c7e5e2ff364854e97f86908dbcc8e1 /sys | |
parent | 69b632fb689775afc38c5922e1f07f649316f34f (diff) |
Run socket splice idle timeout without kernel lock.
OK mvs@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 21b31e74a6c..76bed84885a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.340 2024/07/29 10:35:22 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.341 2024/08/01 17:19:01 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -361,7 +361,8 @@ sofree(struct socket *so, int keep_lock) #ifdef SOCKET_SPLICE if (so->so_sp) { /* Reuse splice idle, sounsplice() has been called before. */ - timeout_set_proc(&so->so_sp->ssp_idleto, soreaper, so); + timeout_set_flags(&so->so_sp->ssp_idleto, soreaper, so, + KCLOCK_NONE, TIMEOUT_PROC | TIMEOUT_MPSAFE); timeout_add(&so->so_sp->ssp_idleto, 0); } else #endif /* SOCKET_SPLICE */ @@ -1487,7 +1488,8 @@ sosplice(struct socket *so, int fd, off_t max, struct timeval *tv) so->so_idletv = *tv; else timerclear(&so->so_idletv); - timeout_set_proc(&so->so_idleto, soidle, so); + timeout_set_flags(&so->so_idleto, soidle, so, + KCLOCK_NONE, TIMEOUT_PROC | TIMEOUT_MPSAFE); task_set(&so->so_splicetask, sotask, so); /* |