mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	Kernel: Change kmalloc lock to be recursive
If the heap code dumps a stack trace (e.g. out of memory) then it may recursively call into it. Rather than deadlocking, allow recursion.
This commit is contained in:
		
							parent
							
								
									038dd9f30e
								
							
						
					
					
						commit
						3cc0e86cd8
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -67,7 +67,7 @@ bool g_dump_kmalloc_stacks; | |||
| static u8* s_next_eternal_ptr; | ||||
| static u8* s_end_of_eternal_range; | ||||
| 
 | ||||
| static SpinLock s_lock; | ||||
| static RecursiveSpinLock s_lock; // needs to be recursive because of dump_backtrace()
 | ||||
| 
 | ||||
| void kmalloc_init() | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom