Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplugprocessing

From: Jesse Barnes
Date: Tue Jul 26 2011 - 15:12:40 EST


On Tue, 26 Jul 2011 08:23:13 -0700
Keith Packard <keithp@xxxxxxxxxx> wrote:

> On Tue, 26 Jul 2011 09:24:39 +0200, Daniel Vetter <daniel@xxxxxxxx> wrote:
> > Two things I've noticed:
>
> > - Why not dev->mode_config.mutex?
>
> You're right, of course. I noticed that just after posting that version
> and updated it; the updated version is on my drm-intel-fixes branch
> already (having been reviewed by Jesse).
>
> > - And a nitpick: Why the dev_priv->dev indirection, when dev is
> > already lying around?
>
> All nicely cleaned up by using &mode_config->mutex instead :-)
>
> Thanks for looking it over!

I'd like to amend my reviewed by and say the lock shouldn't be held
around the call to the drm helper function. It queues some work that
also takes the mode config lock, which will break. So you can drop it
before that... Previously I had only checked our internal driver
callbacks but missed that the lock was held across the helper too.

--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/