diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-14 17:58:33 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-02-17 07:43:09 -0500 |
commit | ac9575f75c52bcb455120f8c43376b556acba048 (patch) | |
tree | d7c4699dfa9b97b2a189643043886fe0fe180212 /drivers/media | |
parent | ad28127d7c7c617bca1d426f95b6ffa1fb8f700f (diff) |
V4L/DVB (10625): ivtv: fix decoder crash regression
The video_ioctl2 conversion of ivtv in kernel 2.6.27 introduced a bug
causing decoder commands to crash. The decoder commands should have been
handled from the video_ioctl2 default handler, ensuring correct mapping
of the argument between user and kernel space. Unfortunately they ended
up before the video_ioctl2 call, causing random crashes.
Thanks to hannes@linus.priv.at for testing and helping me track down the
cause!
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index f6b3ef6e691b..9be6244573e9 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1748,6 +1748,18 @@ static long ivtv_default(struct file *file, void *fh, int cmd, void *arg) | |||
1748 | break; | 1748 | break; |
1749 | } | 1749 | } |
1750 | 1750 | ||
1751 | case IVTV_IOC_DMA_FRAME: | ||
1752 | case VIDEO_GET_PTS: | ||
1753 | case VIDEO_GET_FRAME_COUNT: | ||
1754 | case VIDEO_GET_EVENT: | ||
1755 | case VIDEO_PLAY: | ||
1756 | case VIDEO_STOP: | ||
1757 | case VIDEO_FREEZE: | ||
1758 | case VIDEO_CONTINUE: | ||
1759 | case VIDEO_COMMAND: | ||
1760 | case VIDEO_TRY_COMMAND: | ||
1761 | return ivtv_decoder_ioctls(file, cmd, (void *)arg); | ||
1762 | |||
1751 | default: | 1763 | default: |
1752 | return -EINVAL; | 1764 | return -EINVAL; |
1753 | } | 1765 | } |
@@ -1790,18 +1802,6 @@ static long ivtv_serialized_ioctl(struct ivtv *itv, struct file *filp, | |||
1790 | ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, itv->audio_bilingual_mode, itv->audio_stereo_mode); | 1802 | ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, itv->audio_bilingual_mode, itv->audio_stereo_mode); |
1791 | return 0; | 1803 | return 0; |
1792 | 1804 | ||
1793 | case IVTV_IOC_DMA_FRAME: | ||
1794 | case VIDEO_GET_PTS: | ||
1795 | case VIDEO_GET_FRAME_COUNT: | ||
1796 | case VIDEO_GET_EVENT: | ||
1797 | case VIDEO_PLAY: | ||
1798 | case VIDEO_STOP: | ||
1799 | case VIDEO_FREEZE: | ||
1800 | case VIDEO_CONTINUE: | ||
1801 | case VIDEO_COMMAND: | ||
1802 | case VIDEO_TRY_COMMAND: | ||
1803 | return ivtv_decoder_ioctls(filp, cmd, (void *)arg); | ||
1804 | |||
1805 | default: | 1805 | default: |
1806 | break; | 1806 | break; |
1807 | } | 1807 | } |