6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikulas Patocka [ Upstream commit d043f9a1ca929eee76dac940b4ccfb5429e6098f ] No need to modify info->vers if we overwrite it immediately. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Stable-dep-of: 76c6f845dc0c ("dm-ioctl: fix a possible overflow in list_version_get_info") Signed-off-by: Sasha Levin --- drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 57d0bc1545b73..b6f561ed3236c 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -695,7 +695,7 @@ static void list_version_get_info(struct target_type *tt, void *param) strcpy(info->vers->name, tt->name); info->old_vers = info->vers; - info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1); + info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1); } static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name) -- 2.53.0