summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-01-21 11:23:25 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-01-21 11:23:25 +0000
commit096e5c52e45769090e18e89ec7891c7bca35569b (patch)
treee8a3e13c4bcda7e248d006e42eabbc5fd7ed767d /sys/kern/kern_sysctl.c
parent36a58b4698ca257973fa0d094e2442ead091fa2b (diff)
Introduce per-sockbuf `sb_state' to use it with SS_CANTSENDMORE.
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. Opposing the previous reverted diff, the SS_CANTSENDMORE definition left as is, but it used only with `sb_state'. `sb_state' ored with original `so_state' when socket's data exported to the userland, so the ABI kept as it was. Inputs from deraadt@. ok bluhm@
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 7bd657691c8..94ae40f2523 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.409 2023/01/14 01:04:55 cheloha Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.410 2023/01/21 11:23:23 mvs Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -1184,7 +1184,7 @@ fill_file(struct kinfo_file *kf, struct file *fp, struct filedesc *fdp,
}
kf->so_type = so->so_type;
- kf->so_state = so->so_state;
+ kf->so_state = so->so_state | so->so_snd.sb_state;
if (show_pointers)
kf->so_pcb = PTRTOINT64(so->so_pcb);
else