Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 2ca4c92f58f9 ("dm ioctl: prevent empty message")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

Qinglang Miao and committed by
Mike Snitzer
4d7659bf e8dc79d1

+1
+1
drivers/md/dm-ioctl.c
··· 1600 1600 1601 1601 if (!argc) { 1602 1602 DMWARN("Empty message received."); 1603 + r = -EINVAL; 1603 1604 goto out_argv; 1604 1605 } 1605 1606