From: Ira W. Snyder on
The kfifo DMA sample driver is broken. It does not properly initialize
the scatterlist, and therefore causes a kernel BUG with

Signed-off-by: Ira W. Snyder <iws(a)>
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);


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at