All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
@ 2018-07-05 19:09 Jeffery Miller
       [not found] ` <20180705191000.98872-1-jmiller-QeEie8R3kYhl57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffery Miller @ 2018-07-05 19:09 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

If have a couple patches I found while looking at a panic
I was seeing while unloading the nouveau module.

Unloading the nouveau module on my optimus notebook machine causes
the system to panic. This started occuring when moving from 4.4
to 4.14.

These patches make it such that the system does not panic
when unloading the module.

4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
pointer access in nouveau_fbcon_destroy") which was already included in
the 4.18 tree.

These patches make it so I can unload the module without a panic but
there is a warning when unloading the module:
 sysfs group 'power' not found for kobject 'nv_backlight'
 WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80
 RIP: 0010:sysfs_remove_group+0x76/0x80
 Call Trace:
  device_del+0x56/0x350
  ? down_write+0xe/0x40
  device_unregister+0x16/0x60
  nouveau_backlight_exit+0x4a/0x60 [nouveau]
  nouveau_display_destroy+0x29/0x80 [nouveau]
  nouveau_drm_unload+0x61/0xd0 [nouveau]
  drm_dev_unregister+0x3f/0xe0 [drm]
  drm_put_dev+0x27/0x50 [drm]
  nouveau_drm_device_remove+0x47/0x70 [nouveau]
  pci_device_remove+0x3b/0xb0
  device_release_driver_internal+0x180/0x250
  driver_detach+0x32/0x5f
  bus_remove_driver+0x74/0xc6
  pci_unregister_driver+0x22/0xa0
  nouveau_drm_exit+0x15/0x16b [nouveau]

I don't beleive them to be related. Perhaps there is another issue here?

Jeffery Miller (2):
  drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy.
  drm/nouveau/bl: Allocate backlight connector nodes.

 drivers/gpu/drm/nouveau/nouveau_backlight.c | 70 ++++++++++++++-------
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  5 +-
 2 files changed, 51 insertions(+), 24 deletions(-)

-- 
2.17.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy.
       [not found] ` <20180705191000.98872-1-jmiller-QeEie8R3kYhl57MIdRCFDg@public.gmane.org>
@ 2018-07-05 19:09   ` Jeffery Miller
  2018-07-05 19:10   ` [PATCH 2/2] drm/nouveau/bl: Allocate backlight connector nodes Jeffery Miller
  2018-07-17 10:46   ` [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload Karol Herbst
  2 siblings, 0 replies; 8+ messages in thread
From: Jeffery Miller @ 2018-07-05 19:09 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

It is possible for this to get called with a null helper.fb. This can
cause a bad pointer access when unloading the nouveau module on an
Optimus system.

Signed-off-by: Jeffery Miller <jmiller@neverware.com>
---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 85c1f10bc2b6..99b2e5bb2bce 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -420,7 +420,10 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
 static int
 nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
 {
-	struct nouveau_framebuffer *nouveau_fb = nouveau_framebuffer(fbcon->helper.fb);
+	struct nouveau_framebuffer *nouveau_fb = NULL;
+
+	if (fbcon->helper.fb)
+		nouveau_fb = nouveau_framebuffer(fbcon->helper.fb);
 
 	drm_fb_helper_unregister_fbi(&fbcon->helper);
 	drm_fb_helper_fini(&fbcon->helper);
-- 
2.17.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] drm/nouveau/bl: Allocate backlight connector nodes.
       [not found] ` <20180705191000.98872-1-jmiller-QeEie8R3kYhl57MIdRCFDg@public.gmane.org>
  2018-07-05 19:09   ` [PATCH 1/2] drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy Jeffery Miller
@ 2018-07-05 19:10   ` Jeffery Miller
  2018-07-17 10:46   ` [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload Karol Herbst
  2 siblings, 0 replies; 8+ messages in thread
From: Jeffery Miller @ 2018-07-05 19:10 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Avoid adding nodes to the bl_connectors list from
the stack.

Nodes on the stack were being added to the bl_connectors list.
nouveau_backlight_exit would panic while traversing the bl_connectors list.

This panic was observed on an optimus system when unloading the nouveau
module.

Signed-off-by: Jeffery Miller <jmiller@neverware.com>
---
 drivers/gpu/drm/nouveau/nouveau_backlight.c | 70 ++++++++++++++-------
 1 file changed, 47 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index debbbf0fd4bd..fce2441cce0d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -46,19 +46,40 @@ struct backlight_connector {
 	int id;
 };
 
-static bool
+static void
 nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], struct backlight_connector
 		*connector)
 {
-	const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL);
-	if (nb < 0 || nb >= 100)
-		return false;
-	if (nb > 0)
-		snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb);
+	if (connector->id > 0)
+		snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d",
+				connector->id);
 	else
 		snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight");
-	connector->id = nb;
-	return true;
+}
+
+static struct backlight_connector *
+nouveau_alloc_bl_connector(void)
+{
+	const int nb = ida_simple_get(&bl_ida, 0, 100, GFP_KERNEL);
+	struct backlight_connector *bl_connector;
+
+	if (nb < 0)
+		return ERR_PTR(nb);
+	bl_connector = kzalloc(sizeof(*bl_connector), GFP_KERNEL);
+	if (!bl_connector) {
+		ida_simple_remove(&bl_ida, nb);
+		return ERR_PTR(-ENOMEM);
+	}
+	bl_connector->id = nb;
+	return bl_connector;
+}
+
+static void
+nouveau_free_bl_connector(struct backlight_connector *bl_connector)
+{
+	if (bl_connector->id >= 0)
+		ida_simple_remove(&bl_ida, bl_connector->id);
+	kfree(bl_connector);
 }
 
 static int
@@ -99,7 +120,7 @@ nv40_backlight_init(struct drm_connector *connector)
 	struct nvif_object *device = &drm->client.device.object;
 	struct backlight_properties props;
 	struct backlight_device *bd;
-	struct backlight_connector bl_connector;
+	struct backlight_connector *bl_connector;
 	char backlight_name[BL_NAME_SIZE];
 
 	if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
@@ -108,19 +129,21 @@ nv40_backlight_init(struct drm_connector *connector)
 	memset(&props, 0, sizeof(struct backlight_properties));
 	props.type = BACKLIGHT_RAW;
 	props.max_brightness = 31;
-	if (!nouveau_get_backlight_name(backlight_name, &bl_connector)) {
+	bl_connector = nouveau_alloc_bl_connector();
+	if (IS_ERR(bl_connector)) {
 		NV_ERROR(drm, "Failed to retrieve a unique name for the backlight interface\n");
-		return 0;
+		return PTR_ERR(bl_connector);
 	}
+
+	nouveau_get_backlight_name(backlight_name, bl_connector);
 	bd = backlight_device_register(backlight_name , connector->kdev, drm,
 				       &nv40_bl_ops, &props);
 
 	if (IS_ERR(bd)) {
-		if (bl_connector.id > 0)
-			ida_simple_remove(&bl_ida, bl_connector.id);
+		nouveau_free_bl_connector(bl_connector);
 		return PTR_ERR(bd);
 	}
-	list_add(&bl_connector.head, &drm->bl_connectors);
+	list_add(&bl_connector->head, &drm->bl_connectors);
 	drm->backlight = bd;
 	bd->props.brightness = nv40_get_intensity(bd);
 	backlight_update_status(bd);
@@ -218,7 +241,7 @@ nv50_backlight_init(struct drm_connector *connector)
 	struct backlight_properties props;
 	struct backlight_device *bd;
 	const struct backlight_ops *ops;
-	struct backlight_connector bl_connector;
+	struct backlight_connector *bl_connector;
 	char backlight_name[BL_NAME_SIZE];
 
 	nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS);
@@ -241,20 +264,21 @@ nv50_backlight_init(struct drm_connector *connector)
 	memset(&props, 0, sizeof(struct backlight_properties));
 	props.type = BACKLIGHT_RAW;
 	props.max_brightness = 100;
-	if (!nouveau_get_backlight_name(backlight_name, &bl_connector)) {
+	bl_connector = nouveau_alloc_bl_connector();
+	if (IS_ERR(bl_connector)) {
 		NV_ERROR(drm, "Failed to retrieve a unique name for the backlight interface\n");
-		return 0;
+		return PTR_ERR(bl_connector);
 	}
+	nouveau_get_backlight_name(backlight_name, bl_connector);
 	bd = backlight_device_register(backlight_name , connector->kdev,
 				       nv_encoder, ops, &props);
 
 	if (IS_ERR(bd)) {
-		if (bl_connector.id > 0)
-			ida_simple_remove(&bl_ida, bl_connector.id);
+		nouveau_free_bl_connector(bl_connector);
 		return PTR_ERR(bd);
 	}
 
-	list_add(&bl_connector.head, &drm->bl_connectors);
+	list_add(&bl_connector->head, &drm->bl_connectors);
 	drm->backlight = bd;
 	bd->props.brightness = bd->ops->get_brightness(bd);
 	backlight_update_status(bd);
@@ -302,10 +326,10 @@ nouveau_backlight_exit(struct drm_device *dev)
 {
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct backlight_connector *connector;
+	struct backlight_connector *safe;
 
-	list_for_each_entry(connector, &drm->bl_connectors, head) {
-		if (connector->id >= 0)
-			ida_simple_remove(&bl_ida, connector->id);
+	list_for_each_entry_safe(connector, safe, &drm->bl_connectors, head) {
+		nouveau_free_bl_connector(connector);
 	}
 
 	if (drm->backlight) {
-- 
2.17.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
       [not found] ` <20180705191000.98872-1-jmiller-QeEie8R3kYhl57MIdRCFDg@public.gmane.org>
  2018-07-05 19:09   ` [PATCH 1/2] drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy Jeffery Miller
  2018-07-05 19:10   ` [PATCH 2/2] drm/nouveau/bl: Allocate backlight connector nodes Jeffery Miller
@ 2018-07-17 10:46   ` Karol Herbst
       [not found]     ` <CACO55ttE3gSqepk_1MtZss-o53KrtfiuBYVjZp+pM4JDFf7cWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2 siblings, 1 reply; 8+ messages in thread
From: Karol Herbst @ 2018-07-17 10:46 UTC (permalink / raw)
  To: Jeffery Miller; +Cc: nouveau

does this also happen with the newest kernel? I was kind of under the
impression we already fixed such issues.

On Thu, Jul 5, 2018 at 9:09 PM, Jeffery Miller <jmiller@neverware.com> wrote:
> If have a couple patches I found while looking at a panic
> I was seeing while unloading the nouveau module.
>
> Unloading the nouveau module on my optimus notebook machine causes
> the system to panic. This started occuring when moving from 4.4
> to 4.14.
>
> These patches make it such that the system does not panic
> when unloading the module.
>
> 4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
> pointer access in nouveau_fbcon_destroy") which was already included in
> the 4.18 tree.
>
> These patches make it so I can unload the module without a panic but
> there is a warning when unloading the module:
>  sysfs group 'power' not found for kobject 'nv_backlight'
>  WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80
>  RIP: 0010:sysfs_remove_group+0x76/0x80
>  Call Trace:
>   device_del+0x56/0x350
>   ? down_write+0xe/0x40
>   device_unregister+0x16/0x60
>   nouveau_backlight_exit+0x4a/0x60 [nouveau]
>   nouveau_display_destroy+0x29/0x80 [nouveau]
>   nouveau_drm_unload+0x61/0xd0 [nouveau]
>   drm_dev_unregister+0x3f/0xe0 [drm]
>   drm_put_dev+0x27/0x50 [drm]
>   nouveau_drm_device_remove+0x47/0x70 [nouveau]
>   pci_device_remove+0x3b/0xb0
>   device_release_driver_internal+0x180/0x250
>   driver_detach+0x32/0x5f
>   bus_remove_driver+0x74/0xc6
>   pci_unregister_driver+0x22/0xa0
>   nouveau_drm_exit+0x15/0x16b [nouveau]
>
> I don't beleive them to be related. Perhaps there is another issue here?
>
> Jeffery Miller (2):
>   drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy.
>   drm/nouveau/bl: Allocate backlight connector nodes.
>
>  drivers/gpu/drm/nouveau/nouveau_backlight.c | 70 ++++++++++++++-------
>  drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  5 +-
>  2 files changed, 51 insertions(+), 24 deletions(-)
>
> --
> 2.17.1
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
       [not found]     ` <CACO55ttE3gSqepk_1MtZss-o53KrtfiuBYVjZp+pM4JDFf7cWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-07-17 13:05       ` Karol Herbst
       [not found]         ` <CACO55tuK-PLJrx+499TfB0H=fg0kbC0wj49wjc=PZYPEA4AFkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Karol Herbst @ 2018-07-17 13:05 UTC (permalink / raw)
  To: Jeffery Miller; +Cc: nouveau

nevermind, I just hit it today. Will test your patches

On Tue, Jul 17, 2018 at 12:46 PM, Karol Herbst <kherbst@redhat.com> wrote:
> does this also happen with the newest kernel? I was kind of under the
> impression we already fixed such issues.
>
> On Thu, Jul 5, 2018 at 9:09 PM, Jeffery Miller <jmiller@neverware.com> wrote:
>> If have a couple patches I found while looking at a panic
>> I was seeing while unloading the nouveau module.
>>
>> Unloading the nouveau module on my optimus notebook machine causes
>> the system to panic. This started occuring when moving from 4.4
>> to 4.14.
>>
>> These patches make it such that the system does not panic
>> when unloading the module.
>>
>> 4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
>> pointer access in nouveau_fbcon_destroy") which was already included in
>> the 4.18 tree.
>>
>> These patches make it so I can unload the module without a panic but
>> there is a warning when unloading the module:
>>  sysfs group 'power' not found for kobject 'nv_backlight'
>>  WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80
>>  RIP: 0010:sysfs_remove_group+0x76/0x80
>>  Call Trace:
>>   device_del+0x56/0x350
>>   ? down_write+0xe/0x40
>>   device_unregister+0x16/0x60
>>   nouveau_backlight_exit+0x4a/0x60 [nouveau]
>>   nouveau_display_destroy+0x29/0x80 [nouveau]
>>   nouveau_drm_unload+0x61/0xd0 [nouveau]
>>   drm_dev_unregister+0x3f/0xe0 [drm]
>>   drm_put_dev+0x27/0x50 [drm]
>>   nouveau_drm_device_remove+0x47/0x70 [nouveau]
>>   pci_device_remove+0x3b/0xb0
>>   device_release_driver_internal+0x180/0x250
>>   driver_detach+0x32/0x5f
>>   bus_remove_driver+0x74/0xc6
>>   pci_unregister_driver+0x22/0xa0
>>   nouveau_drm_exit+0x15/0x16b [nouveau]
>>
>> I don't beleive them to be related. Perhaps there is another issue here?
>>
>> Jeffery Miller (2):
>>   drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy.
>>   drm/nouveau/bl: Allocate backlight connector nodes.
>>
>>  drivers/gpu/drm/nouveau/nouveau_backlight.c | 70 ++++++++++++++-------
>>  drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  5 +-
>>  2 files changed, 51 insertions(+), 24 deletions(-)
>>
>> --
>> 2.17.1
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
       [not found]         ` <CACO55tuK-PLJrx+499TfB0H=fg0kbC0wj49wjc=PZYPEA4AFkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-07-17 15:21           ` Jeffery Miller
       [not found]             ` <CAERfUWpMjD1MuJJutkmD4jb7im3zDRssL8YZD9JbhoqZLxsC+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffery Miller @ 2018-07-17 15:21 UTC (permalink / raw)
  To: kherbst-H+wXaHxf7aLQT0dZR+AlfA; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Tue, Jul 17, 2018 at 9:05 AM Karol Herbst <kherbst@redhat.com> wrote:
>
> nevermind, I just hit it today. Will test your patches
>
> On Tue, Jul 17, 2018 at 12:46 PM, Karol Herbst <kherbst@redhat.com> wrote:
> > does this also happen with the newest kernel? I was kind of under the
> > impression we already fixed such issues.
> >

I applied those to the linus branch. I did not test against the
skeggsb/nouveau 4.18 branch.
I noticed these new patches by Lyude Paul in the skeggsb/nouveau repo.
I can test on that
branch on Friday when I regain access to the machine.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
       [not found]             ` <CAERfUWpMjD1MuJJutkmD4jb7im3zDRssL8YZD9JbhoqZLxsC+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-07-17 16:42               ` Karol Herbst
       [not found]                 ` <CACO55tung+k27OkW3Q_uojmUHH0okOvh7OMm6jWLz_p4wLp8hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Karol Herbst @ 2018-07-17 16:42 UTC (permalink / raw)
  To: Jeffery Miller; +Cc: nouveau

with your patches I get this in dmesg when removing nouveau:

[  202.510730] ------------[ cut here ]------------
[  202.510731] sysfs group 'power' not found for kobject 'nv_backlight'
[  202.510736] WARNING: CPU: 0 PID: 8156 at fs/sysfs/group.c:235
sysfs_remove_group+0x71/0x80
[  202.510736] Modules linked in: nouveau(-) r8168(O) ttm zram [last
unloaded: nouveau]
[  202.510740] CPU: 0 PID: 8156 Comm: rmmod Tainted: G        W  O
 4.17.6-gentoo #2
[  202.510741] Hardware name: Notebook
P65_P67RGRERA/P65_P67RGRERA, BIOS 1.05.13 01/27/2016
[  202.510742] RIP: 0010:sysfs_remove_group+0x71/0x80
[  202.510743] RSP: 0018:ffffb92305e3fd10 EFLAGS: 00010286
[  202.510744] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
[  202.510745] RDX: 0000000080000001 RSI: ffffffff8225730c RDI: 00000000ffffffff
[  202.510745] RBP: ffffffff820d1320 R08: 0000000000000048 R09: 00000000000003a0
[  202.510746] R10: ffffef72a10e00c0 R11: 0000000000000001 R12: ffffa2378a0a3498
[  202.510746] R13: ffffffffc05bc5d0 R14: ffffa237923a9100 R15: 0000000000000000
[  202.510747] FS:  00007f144ccf7b80(0000) GS:ffffa237b6400000(0000)
knlGS:0000000000000000
[  202.510748] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  202.510748] CR2: 00005596fe880700 CR3: 000000084fc40001 CR4: 00000000003606f0
[  202.510749] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  202.510750] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  202.510750] Call Trace:
[  202.510753]  device_del+0x51/0x350
[  202.510755]  device_unregister+0x9/0x20
[  202.510766]  nouveau_backlight_exit+0x45/0x60 [nouveau]
[  202.510775]  nouveau_display_destroy+0x24/0x70 [nouveau]
[  202.510784]  nouveau_drm_unload+0x66/0xd0 [nouveau]
[  202.510786]  drm_dev_unregister+0x3a/0xe0
[  202.510787]  drm_put_dev+0x22/0x40
[  202.510796]  nouveau_drm_device_remove+0x42/0x70 [nouveau]
[  202.510798]  pci_device_remove+0x36/0xb0
[  202.510800]  device_release_driver_internal+0x155/0x220
[  202.510802]  driver_detach+0x32/0x70
[  202.510803]  bus_remove_driver+0x47/0xa0
[  202.510804]  pci_unregister_driver+0x24/0x90
[  202.510814]  nouveau_drm_exit+0x15/0x4f0 [nouveau]
[  202.510816]  __se_sys_delete_module+0x165/0x230
[  202.510818]  do_syscall_64+0x50/0x160
[  202.510820]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  202.510821] RIP: 0033:0x7f144c417367
[  202.510822] RSP: 002b:00007ffc364f45c8 EFLAGS: 00000202 ORIG_RAX:
00000000000000b0
[  202.510823] RAX: ffffffffffffffda RBX: 00007ffc364f4628 RCX: 00007f144c417367
[  202.510823] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000560e1c6f27e8
[  202.510824] RBP: 0000560e1c6f2780 R08: 00007ffc364f3531 R09: 0000000000000000
[  202.510824] R10: 00000000000008da R11: 0000000000000202 R12: 00007ffc364f47f0
[  202.510825] R13: 00007ffc364f5d08 R14: 0000560e1c6f1260 R15: 0000560e1c6f2780
[  202.510826] Code: ff 48 89 df 5b 5d 41 5c e9 ed c4 ff ff 48 89 df
e8 c5 c1 ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 f0 0d 24 82 e8
7f 44 e4 ff <0f> 0b 5b 5d 41 5c c3 0f 1f 84 00 00 00 00 00 48 85 f6 74
3
1 41
[  202.510845] ---[ end trace acc8d2d94431d002 ]---


On Tue, Jul 17, 2018 at 5:21 PM, Jeffery Miller <jmiller@neverware.com> wrote:
> On Tue, Jul 17, 2018 at 9:05 AM Karol Herbst <kherbst@redhat.com> wrote:
>>
>> nevermind, I just hit it today. Will test your patches
>>
>> On Tue, Jul 17, 2018 at 12:46 PM, Karol Herbst <kherbst@redhat.com> wrote:
>> > does this also happen with the newest kernel? I was kind of under the
>> > impression we already fixed such issues.
>> >
>
> I applied those to the linus branch. I did not test against the
> skeggsb/nouveau 4.18 branch.
> I noticed these new patches by Lyude Paul in the skeggsb/nouveau repo.
> I can test on that
> branch on Friday when I regain access to the machine.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
       [not found]                 ` <CACO55tung+k27OkW3Q_uojmUHH0okOvh7OMm6jWLz_p4wLp8hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-07-17 22:35                   ` Jeffery Miller
  0 siblings, 0 replies; 8+ messages in thread
From: Jeffery Miller @ 2018-07-17 22:35 UTC (permalink / raw)
  To: kherbst-H+wXaHxf7aLQT0dZR+AlfA; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Tue, Jul 17, 2018 at 12:42 PM Karol Herbst <kherbst@redhat.com> wrote:
>
> with your patches I get this in dmesg when removing nouveau:
>
> [  202.510730] ------------[ cut here ]------------
> [  202.510731] sysfs group 'power' not found for kobject 'nv_backlight'
> [  202.510736] WARNING: CPU: 0 PID: 8156 at fs/sysfs/group.c:235
> sysfs_remove_group+0x71/0x80

I am seeing this and will into its cause. It was not clear to me
that it would remove the need for the panic fixes.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-17 22:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 19:09 [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload Jeffery Miller
     [not found] ` <20180705191000.98872-1-jmiller-QeEie8R3kYhl57MIdRCFDg@public.gmane.org>
2018-07-05 19:09   ` [PATCH 1/2] drm/nouveau/fbcon: Fix NULL pointer access in nouveau_fbcon_destroy Jeffery Miller
2018-07-05 19:10   ` [PATCH 2/2] drm/nouveau/bl: Allocate backlight connector nodes Jeffery Miller
2018-07-17 10:46   ` [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload Karol Herbst
     [not found]     ` <CACO55ttE3gSqepk_1MtZss-o53KrtfiuBYVjZp+pM4JDFf7cWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-17 13:05       ` Karol Herbst
     [not found]         ` <CACO55tuK-PLJrx+499TfB0H=fg0kbC0wj49wjc=PZYPEA4AFkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-17 15:21           ` Jeffery Miller
     [not found]             ` <CAERfUWpMjD1MuJJutkmD4jb7im3zDRssL8YZD9JbhoqZLxsC+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-17 16:42               ` Karol Herbst
     [not found]                 ` <CACO55tung+k27OkW3Q_uojmUHH0okOvh7OMm6jWLz_p4wLp8hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-17 22:35                   ` Jeffery Miller

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.