Blame SOURCES/Grow_continue_command-ensure-content-is-properly-ini.patch

2c1b57
From a250ce240f245df594570a5e25398680d403af67 Mon Sep 17 00:00:00 2001
2c1b57
From: NeilBrown <neilb@suse.com>
2c1b57
Date: Thu, 20 Apr 2017 12:40:05 +1000
2c1b57
Subject: [RHEL7.5 PATCH 087/169] Grow_continue_command: ensure 'content'
2c1b57
 is properly initialised.
2c1b57
2c1b57
Grow_continue_command() call verify_reshape_position(), which assumes
2c1b57
that info->sys_name is initialised.
2c1b57
'info' in verify_reshape_position() is 'content' in Grow_continue_command().
2c1b57
2c1b57
In the st->ss->external != 0 branch of that function, sysfs_init() is called
2c1b57
to initialize content->sys_name.
2c1b57
In the st->ss->external == 0 branch, ->sys_name is not initialized so
2c1b57
verify_reshape_position() will not do the right thing.
2c1b57
2c1b57
Signed-off-by: NeilBrown <neilb@suse.com>
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 Grow.c | 1 +
2c1b57
 1 file changed, 1 insertion(+)
2c1b57
2c1b57
diff --git a/Grow.c b/Grow.c
2c1b57
index 15f4ed1..c6967ed 100755
2c1b57
--- a/Grow.c
2c1b57
+++ b/Grow.c
2c1b57
@@ -5002,6 +5002,7 @@ int Grow_continue_command(char *devname, int fd,
2c1b57
 			goto Grow_continue_command_exit;
2c1b57
 		}
2c1b57
 		content = &array;
2c1b57
+		sysfs_init(content, fd, NULL);
2c1b57
 		/* Need to load a superblock.
2c1b57
 		 * FIXME we should really get what we need from
2c1b57
 		 * sysfs
2c1b57
-- 
2c1b57
2.7.4
2c1b57