V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Thu, 15 Oct 2009 04:14:34 +0000 (01:14 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:21:14 +0000 (10:21 -0800)
commit27bff6b55ad0fe861530315bb75eb3401fa1b660
treeee23687e6a17a611785aee670c16d3c1d8a9c4b5
parent53017a39386cce1b7b6da3013176364424793115
V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming

commit 96fbf771d86a90ff006bc62ca4d4de6474b3de31 upstream.

Because the counters were not reset when starting up streaming, they would
be reused from the previous run.  This can result in cases such that when the
second instance of streaming starts up, the "cnt" variable in
em28xx_audio_isocirq() can end up being negative, resulting in attempting to
write to memory before the start of runtime->dma_area (as well as having a
negative number of bytes to copy).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/em28xx/em28xx-audio.c