From: Kieran Bingham Date: Fri, 2 Sep 2016 10:48:27 +0000 (-0300) Subject: [media] v4l: vsp1: Ensure pipeline locking in resume path X-Git-Tag: v4.14-rc1~332^2~1620 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a9e7bd32ba43a050e868ba44c4a0665079a8264;p=platform%2Fkernel%2Flinux-rpi.git [media] v4l: vsp1: Ensure pipeline locking in resume path The vsp1_pipeline_ready() and vsp1_pipeline_run() functions must be called with the pipeline lock held, fix the resume code path. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c index 3e75fb3..474de82 100644 --- a/drivers/media/platform/vsp1/vsp1_pipe.c +++ b/drivers/media/platform/vsp1/vsp1_pipe.c @@ -365,6 +365,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1) void vsp1_pipelines_resume(struct vsp1_device *vsp1) { + unsigned long flags; unsigned int i; /* Resume all running pipelines. */ @@ -379,7 +380,9 @@ void vsp1_pipelines_resume(struct vsp1_device *vsp1) if (pipe == NULL) continue; + spin_lock_irqsave(&pipe->irqlock, flags); if (vsp1_pipeline_ready(pipe)) vsp1_pipeline_run(pipe); + spin_unlock_irqrestore(&pipe->irqlock, flags); } }