Skip to content

Commit 4d7659b

Browse files
Qinglang Miaosnitm
authored andcommitted
dm ioctl: fix error return code in target_message
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 2ca4c92 ("dm ioctl: prevent empty message") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent e8dc79d commit 4d7659b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm-ioctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
16001600

16011601
if (!argc) {
16021602
DMWARN("Empty message received.");
1603+
r = -EINVAL;
16031604
goto out_argv;
16041605
}
16051606

0 commit comments

Comments
 (0)