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, 26 Mar 2013 14:25:15 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Andrei Epure <epure.andrei@...il.com>
Cc:	lenb@...nel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] acpi: replaced kmalloc+memcpy with kmemdup

On Monday, March 11, 2013 10:20:16 AM Andrei Epure wrote:
> Signed-off-by: Andrei Epure <epure.andrei@...il.com>

Added a changelog and applied to linux-pm.git/linux-next.

Thanks,
Rafael


> ---
>  drivers/acpi/bus.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 01708a1..292de3c 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -288,13 +288,12 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
>  	}
>  out_success:
>  	context->ret.length = out_obj->buffer.length;
> -	context->ret.pointer = kmalloc(context->ret.length, GFP_KERNEL);
> +	context->ret.pointer = kmemdup(out_obj->buffer.pointer,
> +				       context->ret.length, GFP_KERNEL);
>  	if (!context->ret.pointer) {
>  		status =  AE_NO_MEMORY;
>  		goto out_kfree;
>  	}
> -	memcpy(context->ret.pointer, out_obj->buffer.pointer,
> -		context->ret.length);
>  	status =  AE_OK;
>  
>  out_kfree:
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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