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

Commit b6fa0cd6 authored by Rob Clark's avatar Rob Clark Committed by Sumit Semwal
Browse files

dma-buf: might_sleep() in dma_buf_unmap_attachment()



We never really clarified if unmap could be done in atomic context.
But since mapping might require sleeping, this implies mutex in use
to synchronize mapping/unmapping, so unmap could sleep as well.  Add
a might_sleep() to clarify this.

Signed-off-by: default avatarRob Clark <rob@ti.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
parent f01af9f8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -298,6 +298,8 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
				struct sg_table *sg_table,
				enum dma_data_direction direction)
{
	might_sleep();

	if (WARN_ON(!attach || !attach->dmabuf || !sg_table))
		return;