[Nouveau] [PATCH] drm/nouveau/bl: Fix oops on driver unbind

Ben Skeggs skeggsb at gmail.com
Fri Mar 16 01:57:32 UTC 2018


On 14 March 2018 at 21:54, Lukas Wunner <lukas at wunner.de> wrote:
> On Mon, Feb 19, 2018 at 10:38:04AM +0100, Pierre Moreau wrote:
>> On 2018-02-17 13:40, Lukas Wunner wrote:
>> > Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate
>> > over the bl_connectors list in nouveau_backlight_exit() but skipped
>> > initializing it in nouveau_backlight_init().
>> > --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
>> > +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
>> > @@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device *dev)
>> >     struct nvif_device *device = &drm->client.device;
>> >     struct drm_connector *connector;
>> >
>> > +   INIT_LIST_HEAD(&drm->bl_connectors);
>> > +
>> >     if (apple_gmux_present()) {
>> >             NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n");
>> >             return 0;
>> >     }
>> >
>> > -   INIT_LIST_HEAD(&drm->bl_connectors);
>> > -
>>
>> We could instead have an early return in the exit function if
>> `apple_gmux_present()` or `drm->bl_connectors` is null, but your
>> current fix seems better.
>>
>> Reviewed-by: Pierre Moreau <pierre.morrow at free.fr>
>
> Hi Ben, just a gentle ping:  I'm not seeing this fix on one of Dave's
> branches and neither in your GitHub repo.  I could merge it through
> drm-misc-fixes but I'd need an ack from you for that.  Also, please
> let me know if you'd prefer the alternative solution Pierre outlined
> above.  Thanks!
Thanks for the ping!  I've picked up the patch in my tree, and
forwarded a -fixes onto Dave.

Ben.

>
> Lukas
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list