mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	Kernel: Propagate overflow errors from Memory::page_round_up
Fixes #11402.
This commit is contained in:
		
							parent
							
								
									11599a3342
								
							
						
					
					
						commit
						33b78915d3
					
				
					 31 changed files with 112 additions and 100 deletions
				
			
		|  | @ -226,7 +226,11 @@ struct KmallocGlobalData { | |||
|         if (padded_allocation_request.has_overflow()) { | ||||
|             PANIC("Integer overflow during kmalloc heap expansion"); | ||||
|         } | ||||
|         size_t new_subheap_size = max(minimum_subheap_size, Memory::page_round_up(padded_allocation_request.value())); | ||||
|         auto rounded_allocation_request = Memory::page_round_up(padded_allocation_request.value()); | ||||
|         if (rounded_allocation_request.is_error()) { | ||||
|             PANIC("Integer overflow computing pages for kmalloc heap expansion"); | ||||
|         } | ||||
|         size_t new_subheap_size = max(minimum_subheap_size, rounded_allocation_request.value()); | ||||
| 
 | ||||
|         dbgln("Unable to allocate {}, expanding kmalloc heap", allocation_request); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guilherme Goncalves
						Guilherme Goncalves