Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269501AbUIZHFX (ORCPT ); Sun, 26 Sep 2004 03:05:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269502AbUIZHFW (ORCPT ); Sun, 26 Sep 2004 03:05:22 -0400 Received: from av7-1-sn1.fre.skanova.net ([81.228.11.113]:8892 "EHLO av7-1-sn1.fre.skanova.net") by vger.kernel.org with ESMTP id S269501AbUIZHFI (ORCPT ); Sun, 26 Sep 2004 03:05:08 -0400 To: Linus Torvalds Cc: Gerd Knorr , Kernel Mailing List Subject: Re: Linux 2.6.9-rc2 References: From: Peter Osterlund Date: 26 Sep 2004 09:05:05 +0200 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2160 Lines: 64 Peter Osterlund writes: > Linus Torvalds writes: > > > Gerd Knorr: > > o v4l: bttv driver update > > This patch, > > http://linus.bkbits.net:8080/linux-2.5/cset@4138a998OBJaigDdWZo3Y58C5Brqlg?nav=index.html|ChangeSet@-2w > > makes my computer lock up or instantly reboot when I try to do a tv > recording with mplayer. I think the patch below should be applied before 2.6.9. It fixes the bug that made the card DMA lots of data to random memory locations, causing lockups and instant reboots. The problem was that the yoffset variable got modified inside the loop, but the logic in the switch statement was meant to work on the initial value of the yoffset variable. (Bug fix extracted from http://marc.theaimsgroup.com/?l=linux-kernel&m=109532814823565&w=2) Signed-off-by: Peter Osterlund --- linux-petero/drivers/media/video/bttv-risc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN drivers/media/video/bttv-risc.c~bttv-crash-fix drivers/media/video/bttv-risc.c --- linux/drivers/media/video/bttv-risc.c~bttv-crash-fix 2004-09-26 08:39:52.627762048 +0200 +++ linux-petero/drivers/media/video/bttv-risc.c 2004-09-26 08:42:23.642804272 +0200 @@ -125,6 +125,7 @@ bttv_risc_planar(struct bttv *btv, struc struct scatterlist *ysg; struct scatterlist *usg; struct scatterlist *vsg; + int topfield = (0 == yoffset); int rc; /* estimate risc mem: worst case is one write per page border + @@ -153,13 +154,13 @@ bttv_risc_planar(struct bttv *btv, struc chroma = 1; break; case 1: - if (!yoffset) + if (topfield) chroma = (line & 1) == 0; else chroma = (line & 1) == 1; break; case 2: - if (!yoffset) + if (topfield) chroma = (line & 3) == 0; else chroma = (line & 3) == 2; _ -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/