projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8dc79d
)
dm ioctl: fix error return code in target_message
author
Qinglang Miao
<miaoqinglang@huawei.com>
Sat, 28 Nov 2020 10:19:59 +0000
(18:19 +0800)
committer
Mike Snitzer
<snitzer@redhat.com>
Fri, 4 Dec 2020 23:04:36 +0000
(18:04 -0500)
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>
drivers/md/dm-ioctl.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-ioctl.c
b/drivers/md/dm-ioctl.c
index
cd0478d
..
5e306bb
100644
(file)
--- a/
drivers/md/dm-ioctl.c
+++ b/
drivers/md/dm-ioctl.c
@@
-1600,6
+1600,7
@@
static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
if (!argc) {
DMWARN("Empty message received.");
+ r = -EINVAL;
goto out_argv;
}