Message ID | alpine.LRH.2.21.2211011653361.7766@file01.intranet.prod.int.rdu2.redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Mike Snitzer |
Headers | show |
Series | [1/4] dm-ioctl: fix misbehavior if list_versions races with module loading | expand |
Index: linux-2.6/drivers/md/dm-ioctl.c =================================================================== --- linux-2.6.orig/drivers/md/dm-ioctl.c 2022-11-01 16:17:58.000000000 +0100 +++ linux-2.6/drivers/md/dm-ioctl.c 2022-11-01 16:17:58.000000000 +0100 @@ -681,7 +681,7 @@ static void list_version_get_info(struct 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)
This is a small code cleanup in list_version_get_info. We don't need to modify info->vers if we overwrite it immediatelly. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> --- drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel