* [patch] i915: missing unlock on error path
@ 2010-05-07 8:37 Dan Carpenter
2010-05-07 8:43 ` Jiri Slaby
2010-05-26 21:18 ` Eric Anholt
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2010-05-07 8:37 UTC (permalink / raw)
To: David Airlie; +Cc: Kristian Høgsberg, jirislaby, Jesse Barnes, dri-devel
There was a missing mutex_unlock(&dev->struct_mutex) on this error path.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
I thought Jiri sent this patch earlier but a google search for "stanse
struct_mutex i965_reset" didn't find any patches, so I'm resending.
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 01e91ea..a605c87 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -369,6 +369,7 @@ int i965_reset(struct drm_device *dev, u8 flags)
}
} else {
DRM_ERROR("Error occurred. Don't know how to reset this chip.\n");
+ mutex_unlock(&dev->struct_mutex);
return -ENODEV;
}
------------------------------------------------------------------------------
--
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] i915: missing unlock on error path
2010-05-07 8:37 [patch] i915: missing unlock on error path Dan Carpenter
@ 2010-05-07 8:43 ` Jiri Slaby
2010-05-26 21:18 ` Eric Anholt
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2010-05-07 8:43 UTC (permalink / raw)
To: Dan Carpenter
Cc: Kristian Høgsberg, David Airlie, Jesse Barnes, dri-devel
On 05/07/2010 10:37 AM, Dan Carpenter wrote:
> There was a missing mutex_unlock(&dev->struct_mutex) on this error path.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> I thought Jiri sent this patch earlier but a google search for "stanse
> struct_mutex i965_reset" didn't find any patches, so I'm resending.
I don't remember either. I found I had only fixed potential NULL-deref
in i915_suspend.
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 01e91ea..a605c87 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -369,6 +369,7 @@ int i965_reset(struct drm_device *dev, u8 flags)
> }
> } else {
> DRM_ERROR("Error occurred. Don't know how to reset this chip.\n");
> + mutex_unlock(&dev->struct_mutex);
> return -ENODEV;
> }
>
--
js
------------------------------------------------------------------------------
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] i915: missing unlock on error path
2010-05-07 8:37 [patch] i915: missing unlock on error path Dan Carpenter
2010-05-07 8:43 ` Jiri Slaby
@ 2010-05-26 21:18 ` Eric Anholt
1 sibling, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2010-05-26 21:18 UTC (permalink / raw)
To: Dan Carpenter, David Airlie
Cc: Høgsberg, jirislaby, Jesse Barnes, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 954 bytes --]
On Fri, 7 May 2010 10:37:01 +0200, Dan Carpenter <error27@gmail.com> wrote:
> There was a missing mutex_unlock(&dev->struct_mutex) on this error path.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> I thought Jiri sent this patch earlier but a google search for "stanse
> struct_mutex i965_reset" didn't find any patches, so I'm resending.
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 01e91ea..a605c87 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -369,6 +369,7 @@ int i965_reset(struct drm_device *dev, u8 flags)
> }
> } else {
> DRM_ERROR("Error occurred. Don't know how to reset this chip.\n");
> + mutex_unlock(&dev->struct_mutex);
> return -ENODEV;
> }
>
Heh, got another version of this patch from Daniel J Blueman and ended
up applying his first as I went through my tag:todo list. Thanks,
though!
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 80 bytes --]
------------------------------------------------------------------------------
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-26 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 8:37 [patch] i915: missing unlock on error path Dan Carpenter
2010-05-07 8:43 ` Jiri Slaby
2010-05-26 21:18 ` Eric Anholt
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.