提交 a5675c8a 编写于 作者: S Sebastian Andrzej Siewior 提交者: Nicholas Bellinger

target/configfs: allocate only 6 slots for dev_cg->default_groups

Only slots 0-5 are used so 6 slots should be enough. I don't see anyone
writting anything else than NULL into ->default_groups[5] so a "late"
initialisation should not happen here.

(nab: Fix up minor apply breakage in for-next)
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 1c98d2f4
......@@ -2496,7 +2496,7 @@ static struct config_group *target_core_make_subdev(
dev_cg = &dev->dev_group;
dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 7,
dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 6,
GFP_KERNEL);
if (!dev_cg->default_groups)
goto out_free_device;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册