The commit caused hangs with NFS.
Reported by ajacoutot@ and naddy@
-/* $OpenBSD: sys_pipe.c,v 1.137 2022/05/06 13:09:41 visa Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.138 2022/05/09 14:49:55 visa Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
{
rw_assert_wrlock(cpipe->pipe_lock);
- KNOTE(&cpipe->pipe_sel.si_note, 0);
+ if (cpipe->pipe_state & PIPE_SEL) {
+ cpipe->pipe_state &= ~PIPE_SEL;
+ selwakeup(&cpipe->pipe_sel);
+ } else {
+ KNOTE(&cpipe->pipe_sel.si_note, 0);
+ }
if (cpipe->pipe_state & PIPE_ASYNC)
pgsigio(&cpipe->pipe_sigio, SIGIO, 0);
-/* $OpenBSD: uipc_socket.c,v 1.276 2022/05/06 13:09:41 visa Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.277 2022/05/09 14:49:55 visa Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
sohasoutofband(struct socket *so)
{
pgsigio(&so->so_sigio, SIGURG, 0);
- KNOTE(&so->so_rcv.sb_sel.si_note, 0);
+ selwakeup(&so->so_rcv.sb_sel);
}
int
-/* $OpenBSD: uipc_socket2.c,v 1.121 2022/05/06 13:09:41 visa Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.122 2022/05/09 14:49:55 visa Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
}
if (sb->sb_flags & SB_ASYNC)
pgsigio(&so->so_sigio, SIGIO, 0);
- KNOTE(&sb->sb_sel.si_note, 0);
+ selwakeup(&sb->sb_sel);
}
/*