subr_witness.c (189544) | subr_witness.c (191672) |
---|---|
1/*- 2 * Copyright (c) 2008 Isilon Systems, Inc. 3 * Copyright (c) 2008 Ilya Maykov <ivmaykov@gmail.com> 4 * Copyright (c) 1998 Berkeley Software Design, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 71 unchanged lines hidden (view full) --- 80 * you have two threads T1 and T2 and a sleepable lock X. Suppose that T1 81 * acquires X and blocks on Giant. Then suppose that T2 acquires Giant and 82 * blocks on X. When T2 blocks on X, T2 will release Giant allowing T1 to 83 * execute. Thus, acquiring Giant both before and after a sleepable lock 84 * will not result in a lock order reversal. 85 */ 86 87#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Isilon Systems, Inc. 3 * Copyright (c) 2008 Ilya Maykov <ivmaykov@gmail.com> 4 * Copyright (c) 1998 Berkeley Software Design, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 71 unchanged lines hidden (view full) --- 80 * you have two threads T1 and T2 and a sleepable lock X. Suppose that T1 81 * acquires X and blocks on Giant. Then suppose that T2 acquires Giant and 82 * blocks on X. When T2 blocks on X, T2 will release Giant allowing T1 to 83 * execute. Thus, acquiring Giant both before and after a sleepable lock 84 * will not result in a lock order reversal. 85 */ 86 87#include <sys/cdefs.h> |
88__FBSDID("$FreeBSD: head/sys/kern/subr_witness.c 189544 2009-03-08 21:48:29Z rwatson $"); | 88__FBSDID("$FreeBSD: head/sys/kern/subr_witness.c 191672 2009-04-29 19:19:13Z bms $"); |
89 90#include "opt_ddb.h" 91#include "opt_hwpmc_hooks.h" 92#include "opt_stack.h" 93#include "opt_witness.h" 94 95#include <sys/param.h> 96#include <sys/bus.h> --- 410 unchanged lines hidden (view full) --- 507 * Routing 508 */ 509 { "so_rcv", &lock_class_mtx_sleep }, 510 { "radix node head", &lock_class_rw }, 511 { "rtentry", &lock_class_mtx_sleep }, 512 { "ifaddr", &lock_class_mtx_sleep }, 513 { NULL, NULL }, 514 /* | 89 90#include "opt_ddb.h" 91#include "opt_hwpmc_hooks.h" 92#include "opt_stack.h" 93#include "opt_witness.h" 94 95#include <sys/param.h> 96#include <sys/bus.h> --- 410 unchanged lines hidden (view full) --- 507 * Routing 508 */ 509 { "so_rcv", &lock_class_mtx_sleep }, 510 { "radix node head", &lock_class_rw }, 511 { "rtentry", &lock_class_mtx_sleep }, 512 { "ifaddr", &lock_class_mtx_sleep }, 513 { NULL, NULL }, 514 /* |
515 * Multicast - protocol locks before interface locks, after UDP locks. | 515 * IPv4 multicast: 516 * protocol locks before interface locks, after UDP locks. |
516 */ 517 { "udpinp", &lock_class_rw }, 518 { "in_multi_mtx", &lock_class_mtx_sleep }, 519 { "igmp_mtx", &lock_class_mtx_sleep }, 520 { "if_addr_mtx", &lock_class_mtx_sleep }, 521 { NULL, NULL }, 522 /* | 517 */ 518 { "udpinp", &lock_class_rw }, 519 { "in_multi_mtx", &lock_class_mtx_sleep }, 520 { "igmp_mtx", &lock_class_mtx_sleep }, 521 { "if_addr_mtx", &lock_class_mtx_sleep }, 522 { NULL, NULL }, 523 /* |
524 * IPv6 multicast: 525 * protocol locks before interface locks, after UDP locks. 526 */ 527 { "udpinp", &lock_class_rw }, 528 { "in6_multi_mtx", &lock_class_mtx_sleep }, 529 { "mld_mtx", &lock_class_mtx_sleep }, 530 { "if_addr_mtx", &lock_class_mtx_sleep }, 531 { NULL, NULL }, 532 /* |
|
523 * UNIX Domain Sockets 524 */ 525 { "unp_global_rwlock", &lock_class_rw }, 526 { "unp_list_lock", &lock_class_mtx_sleep }, 527 { "unp", &lock_class_mtx_sleep }, 528 { "so_snd", &lock_class_mtx_sleep }, 529 { NULL, NULL }, 530 /* --- 2256 unchanged lines hidden --- | 533 * UNIX Domain Sockets 534 */ 535 { "unp_global_rwlock", &lock_class_rw }, 536 { "unp_list_lock", &lock_class_mtx_sleep }, 537 { "unp", &lock_class_mtx_sleep }, 538 { "so_snd", &lock_class_mtx_sleep }, 539 { NULL, NULL }, 540 /* --- 2256 unchanged lines hidden --- |