Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc0f5cb9 authored by Lloyd Atkinson's avatar Lloyd Atkinson
Browse files

drm/msm/dsi-staging: take struct mutex before gem free



Take the device struct mutex before freeing a gem buffer using
msm_gem_free_object, which requires that mutex to be held.

Change-Id: Idb8729c4734ba96e4b5f7e912ef85b11648bb6c9
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent 84a47e8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1193,7 +1193,9 @@ static int dsi_ctrl_buffer_deinit(struct dsi_ctrl *dsi_ctrl)

		msm_gem_put_iova(dsi_ctrl->tx_cmd_buf, aspace);

		mutex_lock(&dsi_ctrl->drm_dev->struct_mutex);
		msm_gem_free_object(dsi_ctrl->tx_cmd_buf);
		mutex_unlock(&dsi_ctrl->drm_dev->struct_mutex);
		dsi_ctrl->tx_cmd_buf = NULL;
	}

+2 −0
Original line number Diff line number Diff line
@@ -1690,7 +1690,9 @@ static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
put_iova:
	msm_gem_put_iova(display->tx_cmd_buf, aspace);
free_gem:
	mutex_lock(&display->drm_dev->struct_mutex);
	msm_gem_free_object(display->tx_cmd_buf);
	mutex_unlock(&display->drm_dev->struct_mutex);
error:
	return rc;
}