Skip to content

Commit

Permalink
[media] hdpvr: fix race conditon during start of streaming
Browse files Browse the repository at this point in the history
status has to be set to STREAMING before the streaming worker is
queued. hdpvr_transmit_buffers() will exit immediately otherwise.

Reported-by: Joerg Desch <vvd.joede@googlemail.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Janne Grunau authored and Mauro Carvalho Chehab committed Feb 14, 2012
1 parent 63ae37e commit afa1595
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/video/hdpvr/hdpvr-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev)

hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00);

dev->status = STATUS_STREAMING;

INIT_WORK(&dev->worker, hdpvr_transmit_buffers);
queue_work(dev->workqueue, &dev->worker);

v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev,
"streaming started\n");
dev->status = STATUS_STREAMING;

return 0;
}
Expand Down

0 comments on commit afa1595

Please sign in to comment.