提交 9c9cff55 编写于 作者: S Simon Farnsworth 提交者: Mauro Carvalho Chehab

[media] saa7134: Fix crash when device is closed before streamoff

pm_qos_remove_request was not called on video_release, resulting in the PM
core's list of requests being corrupted when the file handle was freed.
This has no immediate symptoms, but later in operation, the kernel will
panic as the PM core dereferences a dangling pointer.
Signed-off-by: NSimon Farnsworth <simon.farnsworth@onelan.co.uk>
Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 f527b17a
...@@ -1455,6 +1455,7 @@ static int video_release(struct file *file) ...@@ -1455,6 +1455,7 @@ static int video_release(struct file *file)
/* stop video capture */ /* stop video capture */
if (res_check(fh, RESOURCE_VIDEO)) { if (res_check(fh, RESOURCE_VIDEO)) {
pm_qos_remove_request(&dev->qos_request);
videobuf_streamoff(&fh->cap); videobuf_streamoff(&fh->cap);
res_free(dev,fh,RESOURCE_VIDEO); res_free(dev,fh,RESOURCE_VIDEO);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册