dtrace_probe() is a function that can be called in many sensitive contexts and relies on never recursing. This is because if there is a recursive call to dtrace_probe(), there will either be an ordering violation or there is a programmer error and a function was instrumented that should not have been.
Currently, when the latter happens the machine locks up due to continuously recursing in the kernel and it can be difficult to debug. This patch adds a new flag in DTrace-specific thread options that denotes recursion and asserts that we are not recursing unless dtrace_probe() is called with dtrace_probeid_error.
Sponsored by: DARPA/AFRL.