提交 06f837ca 编写于 作者: D Devin Heitmueller 提交者: Mauro Carvalho Chehab

V4L/DVB (11784): cx88: Fix race condition between cx8800 startup and hald

A power management fix to properly put the xc5000 into low power mode
revealed a race condition where hald could detect the creation of the device
file and connect to the device while the initial device configuration is
still in progress.

Lock the core structure so that video_release cannot be called and put the
tuner to sleep in the middle of the initial call to cx88_set_tvnorm() in
cx8800_initdev()

Thanks to Michael Krufky for discovering the issue and providing an
environment to test in.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 b02064ca
无相关合并请求
......@@ -926,8 +926,10 @@ static int video_release(struct file *file)
file->private_data = NULL;
kfree(fh);
mutex_lock(&dev->core->lock);
if(atomic_dec_and_test(&dev->core->users))
call_all(dev->core, tuner, s_standby);
mutex_unlock(&dev->core->lock);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部