On Wednesday 17 March 2010 21:57:18, Sakari Ailus wrote:
> Arnout Vandecappelle wrote:
> > diff --git a/drivers/media/video/videobuf-dma-sg.c
> > b/drivers/media/video/videobuf-dma-sg.c index da1790e..3b6f1b8 100644
> > --- a/drivers/media/video/videobuf-dma-sg.c
> > +++ b/drivers/media/video/videobuf-dma-sg.c
> > @@ -244,7 +244,7 @@ int videobuf_dma_map(struct videobuf_queue* q,
> > struct videobuf_dmabuf *dma)
> >
> > }
> > if (!dma->bus_addr) {
> >
> > dma->sglen = dma_map_sg(q->dev, dma->sglist,
> >
> > - dma->nr_pages, dma->direction);
> > + dma->sglen, dma->direction);
> >
> > if (0 == dma->sglen) {
> >
> > printk(KERN_WARNING
> >
> > "%s: videobuf_map_sg failed\n",__func__);
>
> Where is dma->sglen actually set?
>
> videobuf_dma_map() is used in __videobuf_iolock
> (drivers/media/video/videobuf-dma-sg.c) but neither
> videobuf_dma_init_kernel() nor videobuf_dma_init_user() seem to set it.
> This apparently leaves the value uninitialised.
>
> I definitely think it should be assigned somewhere. :-)
It's assigned there exactly - nr_pages shouldn't have been replaced there.
Updated patches follow.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html