diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-06-13 00:23:03 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-06-13 00:23:03 +0000 |
commit | e3d9cae8b629bd000108b449f98632b9af0fb07a (patch) | |
tree | 0583baaf09e02f1a5f822b681815bc743865432b /sys/kern/subr_witness.c | |
parent | 7c0b73a950719087d8e67685a9ffa0d702c4ed19 (diff) | |
download | FreeBSD-src-e3d9cae8b629bd000108b449f98632b9af0fb07a.zip FreeBSD-src-e3d9cae8b629bd000108b449f98632b9af0fb07a.tar.gz |
Introduce socket and UNIX domain socket locks into hard-coded lock
order definition for witness. Send lock before receive lock, and
socket locks after accept but before select:
filedesc -> accept -> so_snd -> so_rcv -> sellck
All routing locks after send lock:
so_rcv -> radix node head
All protocol locks before socket locks:
unp -> so_snd
udp -> udpinp -> so_snd
tcp -> tcpinp -> so_snd
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index e532da2..2e5527a 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -272,30 +272,37 @@ static struct witness_order_list_entry order_lists[] = { */ { "filedesc structure", &lock_class_mtx_sleep }, { "accept", &lock_class_mtx_sleep }, + { "so_snd", &lock_class_mtx_sleep }, + { "so_rcv", &lock_class_mtx_sleep }, { "sellck", &lock_class_mtx_sleep }, { NULL, NULL }, /* * Routing */ + { "so_rcv", &lock_class_mtx_sleep }, { "radix node head", &lock_class_mtx_sleep }, { "rtentry", &lock_class_mtx_sleep }, { "ifaddr", &lock_class_mtx_sleep }, { NULL, NULL }, /* * UNIX Domain Sockets - { NULL, NULL }, */ + { "unp", &lock_class_mtx_sleep }, + { "so_snd", &lock_class_mtx_sleep }, + { NULL, NULL }, /* * UDP/IP */ { "udp", &lock_class_mtx_sleep }, { "udpinp", &lock_class_mtx_sleep }, + { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* * TCP/IP */ { "tcp", &lock_class_mtx_sleep }, { "tcpinp", &lock_class_mtx_sleep }, + { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* * SLIP |