> On 20 Nov 2022, at 14:20, owner-source-chan...@openbsd.org wrote: > > > From: Klemens Nanni <k...@cvs.openbsd.org> > Subject: CVS: cvs.openbsd.org: src > Date: 19 November 2022 at 17:26:40 GMT+3 > To: source-chan...@cvs.openbsd.org > > > CVSROOT: /cvs > Module name: src > Changes by: k...@cvs.openbsd.org 2022/11/19 07:26:40 > > Modified files: > sys/kern : sys_socket.c > sys/netinet : in.c > sys/netinet6 : in6.c > > Log message: > Push kernel lock into pru_control() aka. in6_control() / in_control() > > so->so_state is already read without kernel lock inside soo_ioctl() > which calls pru_control() aka in6_control() and in_control(). > > OK mvs >
This descriptions is totally incorrect. We don’t “read without kernel lock” so->so_state! We do unlocked check ok SS_PRIV flag because this flag is immutable, not because "we did unlocked access to so_state somewhere else"! This difference is significant.