summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-12-11 21:19:09 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-12-11 21:19:09 +0000
commit61e6bff432802649033fc9deb226e83255763605 (patch)
tree40b3de142b46eef76a916467a6531cf7454495f6 /sys/kern/uipc_usrreq.c
parentb99b167030a0a2fbeab051ba2208138a878c5107 (diff)
This time, socket's buffer lock requires solock() to be held. As a part of
socket buffers standalone locking work, move socket state bits which represent its buffers state to per buffer state. Introduce `sb_state' and turn SS_CANTSENDMORE to SBS_CANTSENDMORE. This bit will be processed on `so_snd' buffer only. Move SS_CANTRCVMORE and SS_RCVATMARK bits with separate diff to make review easier and exclude possible so_rcv/so_snd mistypes. Also, don't adjust the remaining SS_* bits right now. ok millert@
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 45267dd2071..d83eb7c25ce 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.195 2022/12/05 23:18:37 deraadt Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.196 2022/12/11 21:19:08 mvs Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -509,7 +509,7 @@ uipc_send(struct socket *so, struct mbuf *m, struct mbuf *nam,
goto out;
}
- if (so->so_state & SS_CANTSENDMORE) {
+ if (so->so_snd.sb_state & SBS_CANTSENDMORE) {
error = EPIPE;
goto dispose;
}