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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A1E28E6.2090807@gmail.com>
Date:	Thu, 28 May 2009 08:02:14 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC:	mchehab@...hat.com, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] vino: replace dma_sync_single with dma_sync_single_for_cpu

On 05/28/2009 03:10 AM, FUJITA Tomonori wrote:
> This replaces dma_sync_single() with dma_sync_single_for_cpu() because
> dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:
> 
> /* Backwards compat, remove in 2.7.x */
> #define dma_sync_single		dma_sync_single_for_cpu
> #define dma_sync_sg		dma_sync_sg_for_cpu
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> ---
>  drivers/media/video/vino.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c
> index 43e0998..97b082f 100644
> --- a/drivers/media/video/vino.c
> +++ b/drivers/media/video/vino.c
> @@ -868,9 +868,9 @@ static void vino_sync_buffer(struct vino_framebuffer *fb)
>  	dprintk("vino_sync_buffer():\n");
>  
>  	for (i = 0; i < fb->desc_table.page_count; i++)
> -		dma_sync_single(NULL,
> -				fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i],
> -				PAGE_SIZE, DMA_FROM_DEVICE);
> +		dma_sync_single_for_cpu(NULL,
> +					fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i],
> +					PAGE_SIZE, DMA_FROM_DEVICE);

Shouldn't be there sync_for_device in vino_dma_setup (or somewhere)
then? If I understand the API correctly this won't (and didn't) work on
some platforms.

The same for other drivers who don't free the buffer after the sync but
recycle it instead.
--
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