diff options
author | Rob Clark <rob@ti.com> | 2012-09-28 03:29:43 -0400 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2012-12-20 01:35:05 -0500 |
commit | b6fa0cd62c5b9d47f8e5d42cb2876677a5ed701e (patch) | |
tree | bb8b4c8abd5b37a9aff71b6757187339202d977a /drivers/base/dma-buf.c | |
parent | f01af9f85855e38fbd601e033a8eac204cc4cc1c (diff) |
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: Rob Clark <rob@ti.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'drivers/base/dma-buf.c')
-rw-r--r-- | drivers/base/dma-buf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c index 460e22dee36d..a3f79c495a41 100644 --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c | |||
@@ -298,6 +298,8 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, | |||
298 | struct sg_table *sg_table, | 298 | struct sg_table *sg_table, |
299 | enum dma_data_direction direction) | 299 | enum dma_data_direction direction) |
300 | { | 300 | { |
301 | might_sleep(); | ||
302 | |||
301 | if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) | 303 | if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) |
302 | return; | 304 | return; |
303 | 305 | ||