I've noticed a few situations where people are holding spinlocks across complex procedure calls such as kfree(). This is not legal. spinlocks can only be held across local code for very short duration. Lockmgr locks, tokens, or mutexes should be used in more complex situations.
With regards to locking up subsystems with tokens, I've notice a tad bit of blindly calling lwkt_gettoken()/reltoken in every procedure in a module. Static procedures for which the token is already known to be held should assert that it is held instead of acquiring it recursively. -Matt Matthew Dillon <dil...@backplane.com>