mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: linux-kernel@vger.kernel.org
Cc: Stefani Seibold <stefani@seibold.net>
Subject: Re: [PATCH 1/1] kfifo: fix DMA sample driver
Date: Fri, 13 Aug 2010 11:34:06 -0700	[thread overview]
Message-ID: <20100813183405.GC18691@ovro.caltech.edu> (raw)
In-Reply-To: <20100813183211.GB18691@ovro.caltech.edu>

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@ovro.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
> 

      reply	other threads:[~2010-08-13 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 18:32 Ira W. Snyder
2010-08-13 18:34 ` Ira W. Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100813183405.GC18691@ovro.caltech.edu \
    --to=iws@ovro.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefani@seibold.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®