All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	linux-media@vger.kernel.org, patches@linaro.org,
	daniel.vetter@ffwll.ch, sumit.semwal@linaro.org,
	Rob Clark <rob@ti.com>
Subject: Re: [PATCH] dma-buf: might_sleep() in dma_buf_unmap_attachment()
Date: Fri, 28 Sep 2012 09:39:00 +0200	[thread overview]
Message-ID: <50655414.2060400@canonical.com> (raw)
In-Reply-To: <1348817383-30286-1-git-send-email-rob.clark@linaro.org>

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>

  reply	other threads:[~2012-09-28  7:39 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 [this message]
2012-09-29  6:24   ` Sumit Semwal

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=50655414.2060400@canonical.com \
    --to=maarten.lankhorst@canonical.com \
    --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=patches@linaro.org \
    --cc=rob.clark@linaro.org \
    --cc=rob@ti.com \
    --cc=sumit.semwal@linaro.org \
    /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.