Re: [PATCH 2/3] target/configfs: allocate only 6 slots for dev_cg->default_groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-11-27 at 18:54 +0100, Sebastian Andrzej Siewior wrote:
> 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.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---

Looks good.  Applied to for-next.

Thank you!

--nab

>  drivers/target/target_core_configfs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
> index 82a5af3..cd27192 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -2760,7 +2760,7 @@ static struct config_group *target_core_make_subdev(
>  	se_dev->se_dev_hba = hba;
>  	dev_cg = &se_dev->se_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;


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux