Karol Herbst
2018-Jul-17 13:05 UTC
[Nouveau] [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
nevermind, I just hit it today. Will test your patches On Tue, Jul 17, 2018 at 12:46 PM, Karol Herbst <kherbst at 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 at 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 at lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/nouveau
Jeffery Miller
2018-Jul-17 15:21 UTC
[Nouveau] [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
On Tue, Jul 17, 2018 at 9:05 AM Karol Herbst <kherbst at 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 at 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.
Karol Herbst
2018-Jul-17 16:42 UTC
[Nouveau] [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
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 at neverware.com> wrote:> On Tue, Jul 17, 2018 at 9:05 AM Karol Herbst <kherbst at 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 at 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.
Reasonably Related Threads
- [PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
- [Bug 100691] New: [4.10] BUG: KASAN: use-after-free in drm_calc_vbltimestamp_from_scanoutpos+0x625/0x740
- [PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
- [PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
- [PATCH v3 0/4] nouveau RPM fixes for Optimus (final)