diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-27 05:51:00 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-13 09:13:56 -0700 |
commit | c313cb6abc8ae377319b6f3b09cb39d71b663b2f (patch) | |
tree | 8706ef9ba94f8740ab6a02ad9e4461075c65d053 /lib/mpi/mpi-bit.c | |
parent | 44bf24730750a6270352352ad81b1e4c92ebd151 (diff) |
uvcvideo: Fix race-related crash in uvc_video_clock_update()
commit ed0ee0ce0a3224dab5caa088a5f8b6df25924276 upstream.
The driver frees the clock samples buffer before stopping the video
buffers queue. If a DQBUF call arrives in-between,
uvc_video_clock_update() will be called with a NULL clock samples
buffer, leading to a crash. This occurs very frequently when using the
webcam with the flash browser plugin.
Move clock initialization/cleanup to uvc_video_enable() in order to free
the clock samples buffer after the queue is stopped. Make sure the clock
is reset at resume time to avoid miscalculating timestamps.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions