aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2013-09-20 12:15:28 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-10-14 05:37:00 -0400
commit9c9cff55bf4f13dc2fffb5abe466f13e4ac155f9 (patch)
tree7dbe5aede4243caf9e71558819704c4e9e2243d1
parentf527b17ace6794ec732b43be1e00c94da690d7d3 (diff)
[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: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/pci/saa7134/saa7134-video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index e12bbd8c3f0b..fb60da85bc2c 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -1455,6 +1455,7 @@ static int video_release(struct file *file)
1455 1455
1456 /* stop video capture */ 1456 /* stop video capture */
1457 if (res_check(fh, RESOURCE_VIDEO)) { 1457 if (res_check(fh, RESOURCE_VIDEO)) {
1458 pm_qos_remove_request(&dev->qos_request);
1458 videobuf_streamoff(&fh->cap); 1459 videobuf_streamoff(&fh->cap);
1459 res_free(dev,fh,RESOURCE_VIDEO); 1460 res_free(dev,fh,RESOURCE_VIDEO);
1460 } 1461 }