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, 4 Dec 2018 16:00:37 +0100
From:   Noralf Trønnes <noralf@...nnes.org>
To:     YueHaibing <yuehaibing@...wei.com>, airlied@...ux.ie
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] drm/tinydrm: Use kmemdup rather than duplicating
 its implementation in repaper_spi_transfer()


Den 29.11.2018 07.00, skrev YueHaibing:
> use kmemdup rather than duplicating its implementation
>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---

Thanks, applied to drm-misc-next.

Noralf.

>   drivers/gpu/drm/tinydrm/repaper.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tinydrm/repaper.c b/drivers/gpu/drm/tinydrm/repaper.c
> index 07f45a0..54d6fe0 100644
> --- a/drivers/gpu/drm/tinydrm/repaper.c
> +++ b/drivers/gpu/drm/tinydrm/repaper.c
> @@ -108,12 +108,11 @@ static int repaper_spi_transfer(struct spi_device *spi, u8 header,
>   
>   	/* Stack allocated tx? */
>   	if (tx && len <= 32) {
> -		txbuf = kmalloc(len, GFP_KERNEL);
> +		txbuf = kmemdup(tx, len, GFP_KERNEL);
>   		if (!txbuf) {
>   			ret = -ENOMEM;
>   			goto out_free;
>   		}
> -		memcpy(txbuf, tx, len);
>   	}
>   
>   	if (rx) {
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ