lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 23 Oct 2012 19:47:41 +0400
From:	Denis Kirjanov <kirjanov@...il.com>
To:	Borislav Petkov <bp@...64.org>
Cc:	linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] check the kzalloc return value

I'll resubmit a new patch.

Thanks!

On 10/23/12, Borislav Petkov <bp@...64.org> wrote:
> On Mon, Oct 22, 2012 at 07:56:04PM +0400, Denis Kirjanov wrote:
>>
>
> Needs a commit message.
>
>> Signed-off-by: Denis Kirjanov <kirjanov@...il.com>
>> ---
>>  drivers/edac/edac_mc_sysfs.c |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
>> index ed0bc07..55ce016 100644
>> --- a/drivers/edac/edac_mc_sysfs.c
>> +++ b/drivers/edac/edac_mc_sysfs.c
>> @@ -1128,7 +1128,8 @@ int __init edac_mc_sysfs_init(void)
>>  	}
>>
>>  	mci_pdev = kzalloc(sizeof(*mci_pdev), GFP_KERNEL);
>> -
>> +	if (!mci_pdev)
>> +		return -ENOMEM;
>
> This either needs to do
>
> 	edac_put_sysfs_subsys();
>
> on the error-out path.
>
>>  	mci_pdev->bus = edac_subsys;
>>  	mci_pdev->type = &mc_attr_type;
>>  	device_initialize(mci_pdev);
>
> Thanks.
>
> --
> Regards/Gruss,
> Boris.
>
> Advanced Micro Devices GmbH
> Einsteinring 24, 85609 Dornach
> GM: Alberto Bozzo
> Reg: Dornach, Landkreis Muenchen
> HRB Nr. 43632 WEEE Registernr: 129 19551
>


-- 
Regards,
Denis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ