From: Sumit Semwal <sumit.semwal@linaro.org>
To: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Rob Clark <rob.clark@linaro.org>,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
linux-media@vger.kernel.org, patches@linaro.org,
daniel.vetter@ffwll.ch, Rob Clark <rob@ti.com>
Subject: Re: [PATCH] dma-buf: might_sleep() in dma_buf_unmap_attachment()
Date: Sat, 29 Sep 2012 11:54:43 +0530 [thread overview]
Message-ID: <5066942B.7070207@linaro.org> (raw)
In-Reply-To: <50655414.2060400@canonical.com>
On Friday 28 September 2012 01:09 PM, Maarten Lankhorst wrote:
> Op 28-09-12 09:29, Rob Clark schreef:
>> From: Rob Clark <rob@ti.com>
>>
>> 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>
>> ---
>> drivers/base/dma-buf.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
>> index c30f3e1..877eacb 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,
>> struct sg_table *sg_table,
>> enum dma_data_direction direction)
>> {
>> + might_sleep();
>> +
>> if (WARN_ON(!attach || !attach->dmabuf || !sg_table))
>> return;
>>
> Looks good to me!
>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Thanks Rob,
Applied to for-next.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2012-09-29 6:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 7:29 [PATCH] dma-buf: might_sleep() in dma_buf_unmap_attachment() Rob Clark
2012-09-28 7:39 ` Maarten Lankhorst
2012-09-29 6:24 ` Sumit Semwal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5066942B.7070207@linaro.org \
--to=sumit.semwal@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=maarten.lankhorst@canonical.com \
--cc=patches@linaro.org \
--cc=rob.clark@linaro.org \
--cc=rob@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.