From ae8b5803f249444709a0833db32ec2d82aee2b4e Mon Sep 17 00:00:00 2001 From: mvs Date: Thu, 2 May 2024 11:55:31 +0000 Subject: [PATCH] Pass `sosp' instead of `so' to sblock() when locking `so_snd' within sosplice(). ok bluhm --- sys/kern/uipc_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 8b49d6ff787..65ae645171d 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.331 2024/04/30 17:59:15 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.332 2024/05/02 11:55:31 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1426,7 +1426,7 @@ sosplice(struct socket *so, int fd, off_t max, struct timeval *tv) if (sosp->so_sp == NULL) sosp->so_sp = pool_get(&sosplice_pool, PR_WAITOK | PR_ZERO); - if ((error = sblock(so, &sosp->so_snd, SBL_WAIT)) != 0) { + if ((error = sblock(sosp, &sosp->so_snd, SBL_WAIT)) != 0) { goto out; } -- 2.20.1