[Devel] [PATCH RHEL8 COMMIT] ploop: Fix off-by-one in ploop_ctr()
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Apr 30 12:11:06 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.23
------>
commit 9cf205c7f3af5b95997b45e0f605fb8a8e15817e
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Apr 30 12:11:05 2021 +0300
ploop: Fix off-by-one in ploop_ctr()
We dereference at least two arguments: cluster_log and origin_dev.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 5ae0c624c8fb..7b5f81955abe 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -118,7 +118,7 @@ static int ploop_ctr(struct dm_target *ti, unsigned int argc, char **argv)
struct ploop *ploop;
int i, ret;
- if (argc < 1)
+ if (argc < 2)
return -EINVAL;
ploop = kzalloc(sizeof(*ploop), GFP_KERNEL);
More information about the Devel
mailing list