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]
Message-ID: <513E42B1.3030108@lwfinger.net>
Date:	Mon, 11 Mar 2013 15:46:41 -0500
From:	Larry Finger <Larry.Finger@...inger.net>
To:	Andrei Epure <epure.andrei@...il.com>
CC:	chaoming_li@...lsil.com.cn, linville@...driver.com,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup

On 03/10/2013 08:09 AM, Andrei Epure wrote:
> Signed-off-by: Andrei Epure <epure.andrei@...il.com>
> ---
>   drivers/net/wireless/rtlwifi/usb.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
> index 156b527..b5c80b5 100644
> --- a/drivers/net/wireless/rtlwifi/usb.c
> +++ b/drivers/net/wireless/rtlwifi/usb.c
> @@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,
>   	u8 *buffer;
>
>   	wvalue = (u16)(addr & 0x0000ffff);
> -	buffer = kmalloc(len, GFP_ATOMIC);
> +	buffer = kmemdup(data, len, GFP_ATOMIC);
>   	if (!buffer)
>   		return;
> -	memcpy(buffer, data, len);
>   	usb_control_msg(udev, pipe, request, reqtype, wvalue,
>   			index, buffer, len, 50);

Acked-by: Larry Finger <Larry.Finger@...inger.net>

Thanks,

Larry


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