From: Chris Wilson <chris@chris-wilson.co.uk>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Sumit Semwal <sumit.semwal@linaro.org>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>,
Sean Paul <seanpaul@chromium.org>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dma-buf: fix locking in sync_print_obj()
Date: Fri, 24 Jan 2020 10:20:56 +0000 [thread overview]
Message-ID: <157986125623.2524.13979010293671565726@skylake-alporthouse-com> (raw)
In-Reply-To: <20200124101311.drryaegcdc7d4x7e@kili.mountain>
Quoting Dan Carpenter (2020-01-24 10:13:12)
> This is always called with IRQs disabled and we don't actually want to
> enable IRQs at the end.
>
> Fixes: a6aa8fca4d79 ("dma-buf/sw-sync: Reduce irqsave/irqrestore from known context")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/dma-buf/sync_debug.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
> index 101394f16930..952331344b1c 100644
> --- a/drivers/dma-buf/sync_debug.c
> +++ b/drivers/dma-buf/sync_debug.c
> @@ -107,15 +107,16 @@ static void sync_print_fence(struct seq_file *s,
> static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
> {
> struct list_head *pos;
> + unsigned long flags;
>
> seq_printf(s, "%s: %d\n", obj->name, obj->value);
>
> - spin_lock_irq(&obj->lock);
> + spin_lock_irqsave(&obj->lock, flags);
Exactly, it can be just spin_lock() as the irq state is known.
Once again I question why this [sync_debug.c] code even exists.
-Chris
next prev parent reply other threads:[~2020-01-24 10:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 10:13 [PATCH] dma-buf: fix locking in sync_print_obj() Dan Carpenter
2020-01-24 10:20 ` Chris Wilson [this message]
2020-01-24 10:31 ` Dan Carpenter
2020-01-24 11:15 ` Chris Wilson
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=157986125623.2524.13979010293671565726@skylake-alporthouse-com \
--to=chris@chris-wilson.co.uk \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=seanpaul@chromium.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).