From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: drm/nouveau/pwr: initial implementation
Date: Tue, 12 Nov 2013 16:47:38 -0500 (EST) [thread overview]
Message-ID: <1128502611.21441586.1384292858165.JavaMail.root@redhat.com> (raw)
In-Reply-To: <20131112095433.GA8844@elgon.mountain>
----- Original Message -----
> From: "Dan Carpenter" <dan.carpenter@oracle.com>
> To: bskeggs@redhat.com
> Cc: dri-devel@lists.freedesktop.org
> Sent: Tuesday, 12 November, 2013 7:54:33 PM
> Subject: re: drm/nouveau/pwr: initial implementation
>
> Hello Ben Skeggs,
Hey,
>
> The patch ff4b42c7532e: "drm/nouveau/pwr: initial implementation"
> from Oct 15, 2013, leads to the following Smatch warning:
> "drivers/gpu/drm/nouveau/core/subdev/pwr/base.c:48 nouveau_pwr_send()
> warn: 'mutex:&subdev->mutex' is sometimes locked here and sometimes
> unlocked."
>
> drivers/gpu/drm/nouveau/core/subdev/pwr/base.c
> 35 /* we currently only support a single process at a time
> waiting
> 36 * on a synchronous reply, take the PPWR mutex and tell the
> 37 * receive handler what we're waiting for
> 38 */
> 39 if (reply) {
> 40 mutex_lock(&subdev->mutex);
> 41 ppwr->recv.message = message;
> 42 ppwr->recv.process = process;
> 43 }
> 44
> 45 /* wait for a free slot in the fifo */
> 46 addr = nv_rd32(ppwr, 0x10a4a0);
> 47 if (!nv_wait_ne(ppwr, 0x10a4b0, 0xffffffff, addr ^ 8))
> 48 return -EBUSY;
>
> Should we have an if (reply) mutex_unlock(&subdev->mutex) before the
> return?
Yes, we should. It's been reported, no fix pushed to Linus' tree yet as the path that can hit it has been hardcoded as disabled for this release.
Thanks,
Ben.
>
> 49
>
> regards,
> dan carpenter
>
>
prev parent reply other threads:[~2013-11-12 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 9:54 drm/nouveau/pwr: initial implementation Dan Carpenter
2013-11-12 21:47 ` Ben Skeggs [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=1128502611.21441586.1384292858165.JavaMail.root@redhat.com \
--to=bskeggs@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.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.