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:	Fri, 13 Aug 2010 11:34:06 -0700
From:	"Ira W. Snyder" <iws@...o.caltech.edu>
To:	linux-kernel@...r.kernel.org
Cc:	Stefani Seibold <stefani@...bold.net>
Subject: Re: [PATCH 1/1] kfifo: fix DMA sample driver

On Fri, Aug 13, 2010 at 11:32:11AM -0700, Ira W. Snyder wrote:
> The kfifo DMA sample driver is broken. It does not properly initialize
> the scatterlist, and therefore causes a kernel BUG with
> CONFIG_DEBUG_SG=y.
> 
> Signed-off-by: Ira W. Snyder <iws@...o.caltech.edu>
> ---

Whoops, forgot to CC Stefani Seibold.

>  samples/kfifo/dma-example.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c
> index b9482c2..baa5060 100644
> --- a/samples/kfifo/dma-example.c
> +++ b/samples/kfifo/dma-example.c
> @@ -45,6 +45,9 @@ static int __init example_init(void)
>  
>  	printk(KERN_INFO "queue len: %u\n", kfifo_len(&fifo));
>  
> +	/* initialize scatterlist */
> +	sg_init_table(sg, ARRAY_SIZE(sg));
> +
>  	ret = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE);
>  	printk(KERN_INFO "DMA sgl entries: %d\n", ret);
>  
> -- 
> 1.7.1
> 
--
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