Fix chunk manager munmap range
When the munmap range is bigger than the Multi-VMA chunk's range, the bound was wrong and the munmap will misbehave.
This commit is contained in:
		
							parent
							
								
									cf080a46a0
								
							
						
					
					
						commit
						fd950132ce
					
				| @ -141,7 +141,9 @@ impl ChunkManager { | ||||
|     } | ||||
| 
 | ||||
|     pub fn munmap_range(&mut self, range: VMRange) -> Result<()> { | ||||
|         let bound = range.start(); | ||||
|         // The bound should be no smaller than the chunk range's start address.
 | ||||
|         let bound = range.start().max(self.range.start()); | ||||
| 
 | ||||
|         let current_pid = current!().process().pid(); | ||||
| 
 | ||||
|         // The cursor to iterate vmas that might intersect with munmap_range.
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user