CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2024/01/11 07:15:12
Modified files: sys/kern : uipc_domain.c uipc_socket.c uipc_socket2.c sys/net : pfkeyv2.c sys/netinet : in_proto.c sys/netinet6 : in6_proto.c sys/sys : domain.h protosw.h socketvar.h Log message: Use domain name for socket lock. Syzkaller with witness complains about lock ordering of pf lock with socket lock. Socket lock for inet is taken before pf lock. Pf lock is taken before socket lock for route. This is a false positive as route and inet socket locks are distinct. Witness does not know this. Name the socket lock like the domain of the socket, then rwlock name is used in witness lo_name subtype. Make domain names more consistent for locking, they were not used anyway. Regardless of witness problem, unique lock name for each socket type make sense. Reported-by: syzbot+34d22dcbf20d76629...@syzkaller.appspotmail.com Reported-by: syzbot+fde8d07ba74b69d0a...@syzkaller.appspotmail.com OK mvs@