diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-01-06 10:58:46 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-01-06 10:58:46 +0000 |
commit | 3a62aa44389f62e3c1882453a2f52127e16354a5 (patch) | |
tree | f6f16cebadab2c8a66c88faafc89268f41b466ee /games/grdc | |
parent | 0e15f6ca0303b5954586a8f02c9027f370722254 (diff) |
Take net lock before kernel lock.
Doing KERNEL_LOCK() just before NET_LOCK() does not make sense.
Net lock is a rwlock that releases kernel lock during sleep. To
avoid an unnecessary release and take kernel lock cycle, move
KERNEL_LOCK() after NET_LOCK().
There is no lock order reversal deadlock issue. Both locks are
used in any order thoughout the kernel. As NET_LOCK() releases the
kernel lock when it cannot take the lock immediately and has to
sleep, we always end in the order kernel lock before net lock after
sleeping.
OK sashan@
Diffstat (limited to 'games/grdc')
0 files changed, 0 insertions, 0 deletions