The patch number 8546 was added via Hans Verkuil <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans Verkuil  <[EMAIL PROTECTED]>
saa7146: fix read from uninitialized memory


The offset field of the scatterlist entry *after* the last valid scatterlist
entry was used instead of the first scatterlist entry (as was the intention
of this code).

This worked fine until the kzalloc of the sglist was replaced with kmalloc
and sg_init_table only zeroed the exact needed length. Apparently kzalloc
zeroes a bit more than is strictly necessary so the offset field was
always 0 in the past.

But now the offset field was suddenly random and this led to broken captures.

Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>


---

 linux/drivers/media/common/saa7146_video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 6753aa3aeee3 -r 9ec3bce7cdea linux/drivers/media/common/saa7146_video.c
--- a/linux/drivers/media/common/saa7146_video.c        Sun Jul 27 09:20:20 
2008 -0300
+++ b/linux/drivers/media/common/saa7146_video.c        Sun Jul 27 19:08:54 
2008 +0200
@@ -657,7 +657,7 @@ static int saa7146_pgtable_build(struct 
 
                /* if we have a user buffer, the first page may not be
                   aligned to a page boundary. */
-               pt1->offset = list->offset;
+               pt1->offset = dma->sglist->offset;
                pt2->offset = pt1->offset+o1;
                pt3->offset = pt1->offset+o2;
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/9ec3bce7cdea66f351dc139f8bcb330c608c5b4a

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to