[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Questions of lock usage in NetBSD kernel code
On 06/26/2017 08:20 AM, Kamil Rytarowski wrote:
On 25.06.2017 20:34, Taylor R Campbell wrote:
Sleeping with a spin lock held is absolutely prohibited and does not
An example of this abuse is described here:
Jia-Ju, can you detect bugs like this one?
In fact, I have written a static tool to detect sleep-in-interrupt and
sleep-in-spin-mutex (sleep between "mutex_spin_enter" and
"mutex_spin_exit") bugs in NetBSD kernel code. And I have found some
bugs, and examples are here:
Meanwhile, in your link
"KERNEL_LOCK" and "KERNEL_UNLOCK" can be regarded as "mutex_spin_enter"
I also find that the code in your link has function pointer, but my
static tool can not handle function pointer in current implementation,
and I will add related support for it in next implementation.
Main Index |
Thread Index |