video: tegra: hdcp: Add Missing Lock
Matt Wagner [Fri, 10 Aug 2012 18:43:35 +0000 (11:43 -0700)]
Lock was missing around one state set, so we add it here.

Bug 1024031

Change-Id: Iab013fff7e8519e8bcc91e84a5ca7cd6e6e783da
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/122802
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

drivers/video/tegra/dc/nvhdcp.c

index b509a6c..30b508c 100644 (file)
@@ -841,7 +841,9 @@ static void nvhdcp_downstream_worker(struct work_struct *work)
                nvhdcp_err("nvhdcp failure - giving up\n");
                goto err;
        }
+       mutex_lock(&nvhdcp->state_lock);
        nvhdcp->state = STATE_UNAUTHENTICATED;
+       mutex_unlock(&nvhdcp->state_lock);
 
        /* check plug state to terminate early in case flush_workqueue() */
        if (!nvhdcp_is_plugged(nvhdcp)) {