mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	dm ioctl: prevent empty message
Detect invalid empty messages in core dm instead of requiring every target to check this. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
		
							parent
							
								
									13c87583ea
								
							
						
					
					
						commit
						2ca4c92f58
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -1402,6 +1402,11 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!argc) {
 | 
				
			||||||
 | 
							DMWARN("Empty message received.");
 | 
				
			||||||
 | 
							goto out;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	table = dm_get_live_table(md);
 | 
						table = dm_get_live_table(md);
 | 
				
			||||||
	if (!table)
 | 
						if (!table)
 | 
				
			||||||
		goto out_argv;
 | 
							goto out_argv;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue