PERFORCE change 23801 for review
Brian Feldman
green at freebsd.org
Thu Jan 16 20:41:42 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=23801
Change 23801 by green at green_laptop_2 on 2003/01/16 12:41:30
Hardcode some SEBSD locks, which removes the warnings... Also,
implement ddb.witness_backtrace to print backtraces along with
all witness messages.
Affected files ...
.. //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#2 edit
Differences ...
==== //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#2 (text+ko) ====
@@ -170,6 +170,11 @@
#endif
TUNABLE_INT("debug.witness_ddb", &witness_ddb);
SYSCTL_INT(_debug, OID_AUTO, witness_ddb, CTLFLAG_RW, &witness_ddb, 0, "");
+
+int witness_backtrace = 0;
+TUNABLE_INT("debug.witness_backtrace", &witness_backtrace);
+SYSCTL_INT(_debug, OID_AUTO, witness_backtrace, CTLFLAG_RW, &witness_backtrace,
+ 0, "Print a backtrace to the console along with the lock order violation itself.");
#endif /* DDB */
#ifdef WITNESS_SKIPSPIN
@@ -204,6 +209,8 @@
{ "session", &lock_class_mtx_sleep },
{ "uidinfo hash", &lock_class_mtx_sleep },
{ "uidinfo struct", &lock_class_mtx_sleep },
+ { "SEBSD AVC", &lock_class_mtx_sleep },
+ { "SEBSD Policy Lock", &lock_class_sx },
{ NULL, NULL },
/*
* spin locks
@@ -711,8 +718,12 @@
out:
#ifdef DDB
- if (witness_ddb && go_into_ddb)
- Debugger(__func__);
+ if (go_into_ddb) {
+ if (witness_ddb)
+ Debugger(__func__);
+ else if (witness_backtrace)
+ db_print_backtrace();
+ }
#endif /* DDB */
w->w_file = file;
w->w_line = line;
@@ -938,8 +949,12 @@
goto again;
}
#ifdef DDB
- if (witness_ddb && n)
- Debugger(__func__);
+ if (n) {
+ if (witness_ddb)
+ Debugger(__func__);
+ else if (witness_backtrace)
+ db_print_backtrace();
+ }
#endif /* DDB */
return (n);
}
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list