mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	fs: ext4: check the minimal partition size to mount
No need to mount a too small partition to handle a EXT4 file system. This patch add a test on partition size before to read the SUPERBLOCK_SIZE buffer and avoid error latter in fs_devread() function. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
		
				
					committed by
					
						 Tom Rini
						Tom Rini
					
				
			
			
				
	
			
			
			
						parent
						
							a6992bf40d
						
					
				
				
					commit
					9905cae65e
				
			| @@ -2373,6 +2373,10 @@ int ext4fs_mount(unsigned part_length) | ||||
| 	struct ext2_data *data; | ||||
| 	int status; | ||||
| 	struct ext_filesystem *fs = get_fs(); | ||||
|  | ||||
| 	if (part_length < SUPERBLOCK_SIZE) | ||||
| 		return 0; | ||||
|  | ||||
| 	data = zalloc(SUPERBLOCK_SIZE); | ||||
| 	if (!data) | ||||
| 		return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user