target: Allocate more room for port default groups
authorAndy Grover <agrover@redhat.com>
Wed, 27 Nov 2013 22:57:56 +0000 (14:57 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 16 Dec 2013 20:42:05 +0000 (12:42 -0800)
See target_stat_setup_port_default_groups, we need a 4 element array.

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_fabric_configfs.c

index dae2ad6a669e277d9c95c67098c20cc233dbede6..fdadc4d6259a9904a407416add45ce9bbfbfbb17 100644 (file)
@@ -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) * 3,
+       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");