mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
Kernel: Add the ability to verify we don't kmalloc under spinlock.
Ideally we would never allocate under a spinlock, as it has many performance and potentially functionality (deadlock) pitfalls. We violate that rule in many places today, but we need a tool to track them all down and fix them. This change introduces a new macro option named `KMALLOC_VERIFY_NO_SPINLOCK_HELD` which can catch these situations at runtime via an assert.
This commit is contained in:
parent
6329e9fce6
commit
9c38475608
Notes:
sideshowbarker
2024-07-18 18:09:57 +09:00
Author: https://github.com/bgianfo
Commit: 9c38475608
Pull-request: https://github.com/SerenityOS/serenity/pull/7102
Reviewed-by: https://github.com/tomuta
3 changed files with 18 additions and 0 deletions
|
@ -134,6 +134,10 @@
|
|||
#cmakedefine01 KMALLOC_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef KMALLOC_VERIFY_NO_SPINLOCK_HELD
|
||||
#cmakedefine01 KMALLOC_VERIFY_NO_SPINLOCK_HELD
|
||||
#endif
|
||||
|
||||
#ifndef LOCAL_SOCKET_DEBUG
|
||||
#cmakedefine01 LOCAL_SOCKET_DEBUG
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue