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:	Wed, 28 Oct 2015 04:15:40 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Insu Yun <wuninsu@...il.com>
Cc:	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu
Subject: Re: [PATCH] acpi:correctly check failed allocation

On Thursday, October 15, 2015 12:19:30 PM Insu Yun wrote:
> Since kobject_create_and_add can be failed in memory pressure,
> return value need to be checked and return ENOMEM.
> 
> Signed-off-by: Insu Yun <wuninsu@...il.com>
> ---
>  drivers/acpi/sysfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index 40a4265..e712a7b 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -878,6 +878,8 @@ int __init acpi_sysfs_init(void)
>  		return result;
>  
>  	hotplug_kobj = kobject_create_and_add("hotplug", acpi_kobj);
> +  if (!hotplug_kobj)
> +    return -ENOMEM;
>  	result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr);
>  	if (result)
>  		return result;
> 

Applied (with whitespace fixed), thanks!

Rafael

--
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