aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_fabric_configfs.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2013-12-09 14:27:36 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2013-12-16 12:42:20 -0800
commitab6dae8236767f9815bb00c29a56d045e33cd470 (patch)
tree906d426063e3a19ed2ed62803ba6319ff7a6123e /drivers/target/target_core_fabric_configfs.c
parenttarget: Allocate more room for port default groups (diff)
downloadlinux-dev-ab6dae8236767f9815bb00c29a56d045e33cd470.tar.xz
linux-dev-ab6dae8236767f9815bb00c29a56d045e33cd470.zip
target: Fix sizeof in kmalloc for some default_groups arrays
Allocating an array of pointers, not the objects themselves. These two sites now match all the other sites. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_fabric_configfs.c')
-rw-r--r--drivers/target/target_core_fabric_configfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
index fdadc4d6259a..7de9f0475d05 100644
--- a/drivers/target/target_core_fabric_configfs.c
+++ b/drivers/target/target_core_fabric_configfs.c
@@ -906,7 +906,7 @@ static struct config_group *target_fabric_make_lun(
lun_cg->default_groups[1] = NULL;
port_stat_grp = &lun->port_stat_grps.stat_group;
- port_stat_grp->default_groups = kzalloc(sizeof(struct config_group) * 4,
+ port_stat_grp->default_groups = kzalloc(sizeof(struct config_group *) * 4,
GFP_KERNEL);
if (!port_stat_grp->default_groups) {
pr_err("Unable to allocate port_stat_grp->default_groups\n");