Re: BUG: kernel NULL pointer dereference, address: 0000000000000026 after switching to 5.7 kernel

2020-04-20 Thread Alex Deucher
On Sat, Apr 18, 2020 at 7:13 AM Mikhail Gavrilov
 wrote:
>
> On Sat, 11 Apr 2020 at 14:56, Christian König
>  wrote:
> >
> > Yeah, that is a known issue.
> >
> > You could try the attached patch, but please be aware that it is not
> > even compile tested because of the Easter holidays here.
> >
>
> Looks good to me, so it's pity that this patch did not exist in the
> pull request https://patchwork.kernel.org/patch/11492083/

It should show up in the next drm-misc PR:
https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-fixes=8623b5255ae7ccaf276aac3920787bf575fa6b37

Alex

>
> --
> Best Regards,
> Mike Gavrilov.
> ___
> amd-gfx mailing list
> amd-...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: BUG: kernel NULL pointer dereference, address: 0000000000000026 after switching to 5.7 kernel

2020-04-18 Thread Mikhail Gavrilov
On Sat, 11 Apr 2020 at 14:56, Christian König
 wrote:
>
> Yeah, that is a known issue.
>
> You could try the attached patch, but please be aware that it is not
> even compile tested because of the Easter holidays here.
>

Looks good to me, so it's pity that this patch did not exist in the
pull request https://patchwork.kernel.org/patch/11492083/

--
Best Regards,
Mike Gavrilov.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: BUG: kernel NULL pointer dereference, address: 0000000000000026 after switching to 5.7 kernel

2020-04-13 Thread Russell, Kent
[AMD Official Use Only - Internal Distribution Only]

You can add a Reviewed-By and Tested-By for me on this patch, unless you want 
me to send it out instead, then you can review it.

 Kent

> -Original Message-
> From: amd-gfx  On Behalf Of 
> Christian König
> Sent: Saturday, April 11, 2020 5:57 AM
> To: Mikhail Gavrilov ; amd-gfx list 
> ; dri-devel 
> ; Linux List Kernel Mailing 
> ; Grodzovsky, Andrey 
> ; Russell, Kent 
> Subject: Re: BUG: kernel NULL pointer dereference, address:
> 00000026 after switching to 5.7 kernel
> 
> Yeah, that is a known issue.
> 
> You could try the attached patch, but please be aware that it is not 
> even compile tested because of the Easter holidays here.
> 
> Thanks,
> Christian.
> 
> Am 10.04.20 um 21:51 schrieb Mikhail Gavrilov:
> > Hi folks.
> > After upgrade kernel to 5.7 I see every boot in kernel log following 
> > error messages:
> >
> > [2.569513] [drm] Found UVD firmware ENC: 1.2 DEC: .43 Family ID: 19
> > [2.569538] [drm] PSP loading UVD firmware
> > [2.570038] BUG: kernel NULL pointer dereference, address:
> 0026
> > [2.570045] #PF: supervisor read access in kernel mode
> > [2.570050] #PF: error_code(0x) - not-present page
> > [2.570055] PGD 0 P4D 0
> > [2.570060] Oops:  [#1] SMP NOPTI
> > [2.570065] CPU: 5 PID: 667 Comm: uvd_enc_1.1 Not tainted
> > 5.7.0-0.rc0.git6.1.2.fc33.x86_64 #1
> > [2.570072] Hardware name: System manufacturer System Product
> > Name/ROG STRIX X570-I GAMING, BIOS 1405 11/19/2019
> > [2.570085] RIP: 0010:__kthread_should_park+0x5/0x30
> > [2.570090] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
> > 48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
> > 44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 
> > 02
> > 83 e0
> > [2.570103] RSP: 0018:ad8141723e50 EFLAGS: 00010246
> > [2.570107] RAX: 7fff RBX: 8a8d1d116ed8 RCX:
> 
> > [2.570112] RDX:  RSI:  RDI:
> 
> > [2.570116] RBP: 8a8d28c11300 R08:  R09:
> 
> > [2.570120] R10:  R11:  R12:
> 8a8d1d152e40
> > [2.570125] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15:
> 8a8d1ca68000
> > [2.570131] FS:  () GS:8a8d3aa0()
> > knlGS:
> > [2.570137] CS:  0010 DS:  ES:  CR0: 80050033
> > [2.570142] CR2: 0026 CR3: 0007e3dc6000 CR4:
> 003406e0
> > [2.570147] Call Trace:
> > [2.570157]  drm_sched_get_cleanup_job+0x42/0x130 [gpu_sched]
> > [2.570166]  drm_sched_main+0x6f/0x530 [gpu_sched]
> > [2.570173]  ? lockdep_hardirqs_on+0x11e/0x1b0
> > [2.570179]  ? drm_sched_get_cleanup_job+0x130/0x130 [gpu_sched]
> > [2.570185]  kthread+0x131/0x150
> > [2.570189]  ? __kthread_bind_mask+0x60/0x60
> > [2.570196]  ret_from_fork+0x27/0x50
> > [2.570203] Modules linked in: fjes(-) amdgpu(+) amd_iommu_v2
> > gpu_sched ttm drm_kms_helper drm crc32c_intel igb nvme nvme_core dca 
> > i2c_algo_bit wmi pinctrl_amd br_netfilter bridge stp llc fuse
> > [2.570223] CR2: 0026
> > [2.570228] ---[ end trace 80c25d326e1e0d7c ]---
> > [2.570233] RIP: 0010:__kthread_should_park+0x5/0x30
> > [2.570238] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
> > 48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
> > 44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 
> > 02
> > 83 e0
> > [2.570250] RSP: 0018:ad8141723e50 EFLAGS: 00010246
> > [2.570255] RAX: 7fff RBX: 8a8d1d116ed8 RCX:
> 
> > [2.570260] RDX:  RSI:  RDI:
> 
> > [2.570265] RBP: 8a8d28c11300 R08:  R09:
> 
> > [2.570271] R10:  R11:  R12:
> 8a8d1d152e40
> > [2.570276] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15:
> 8a8d1ca68000
> > [2.570281] FS:  () GS:8a8d3aa0()
> > knlGS:
> > [2.570287] CS:  0010 DS:  ES:  CR0: 80050033
> > [2.570292] CR2: 0026 CR3: 0007e3dc6000 CR4:
> 003406e0
> > [2.570299] BUG: sleeping function called from invalid context at
> > include/linux/percpu-rwsem.h:49
> > [2.570306] in_atomi

Re: BUG: kernel NULL pointer dereference, address: 0000000000000026 after switching to 5.7 kernel

2020-04-11 Thread Hillf Danton


On Sat, 11 Apr 2020 00:51:48 +0500 Mikhail Gavrilov wrote:
> Hi folks.
> After upgrade kernel to 5.7 I see every boot in kernel log following
> error messages:
> 
> [2.569513] [drm] Found UVD firmware ENC: 1.2 DEC: .43 Family ID: 19
> [2.569538] [drm] PSP loading UVD firmware
> [2.570038] BUG: kernel NULL pointer dereference, address: 0026
> [2.570045] #PF: supervisor read access in kernel mode
> [2.570050] #PF: error_code(0x) - not-present page
> [2.570055] PGD 0 P4D 0
> [2.570060] Oops:  [#1] SMP NOPTI
> [2.570065] CPU: 5 PID: 667 Comm: uvd_enc_1.1 Not tainted
> 5.7.0-0.rc0.git6.1.2.fc33.x86_64 #1
> [2.570072] Hardware name: System manufacturer System Product
> Name/ROG STRIX X570-I GAMING, BIOS 1405 11/19/2019
> [2.570085] RIP: 0010:__kthread_should_park+0x5/0x30
> [2.570090] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
> 48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
> 44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 02
> 83 e0
> [2.570103] RSP: 0018:ad8141723e50 EFLAGS: 00010246
> [2.570107] RAX: 7fff RBX: 8a8d1d116ed8 RCX: 
> 
> [2.570112] RDX:  RSI:  RDI: 
> 
> [2.570116] RBP: 8a8d28c11300 R08:  R09: 
> 
> [2.570120] R10:  R11:  R12: 
> 8a8d1d152e40
> [2.570125] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15: 
> 8a8d1ca68000
> [2.570131] FS:  () GS:8a8d3aa0()
> knlGS:
> [2.570137] CS:  0010 DS:  ES:  CR0: 80050033
> [2.570142] CR2: 0026 CR3: 0007e3dc6000 CR4: 
> 003406e0
> [2.570147] Call Trace:
> [2.570157]  drm_sched_get_cleanup_job+0x42/0x130 [gpu_sched]
> [2.570166]  drm_sched_main+0x6f/0x530 [gpu_sched]
> [2.570173]  ? lockdep_hardirqs_on+0x11e/0x1b0
> [2.570179]  ? drm_sched_get_cleanup_job+0x130/0x130 [gpu_sched]
> [2.570185]  kthread+0x131/0x150
> [2.570189]  ? __kthread_bind_mask+0x60/0x60
> [2.570196]  ret_from_fork+0x27/0x50
> [2.570203] Modules linked in: fjes(-) amdgpu(+) amd_iommu_v2
> gpu_sched ttm drm_kms_helper drm crc32c_intel igb nvme nvme_core dca
> i2c_algo_bit wmi pinctrl_amd br_netfilter bridge stp llc fuse
> [2.570223] CR2: 0026
> [2.570228] ---[ end trace 80c25d326e1e0d7c ]---
> [2.570233] RIP: 0010:__kthread_should_park+0x5/0x30
> [2.570238] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
> 48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
> 44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 02
> 83 e0
> [2.570250] RSP: 0018:ad8141723e50 EFLAGS: 00010246
> [2.570255] RAX: 7fff RBX: 8a8d1d116ed8 RCX: 
> 
> [2.570260] RDX:  RSI:  RDI: 
> 
> [2.570265] RBP: 8a8d28c11300 R08:  R09: 
> 
> [2.570271] R10:  R11:  R12: 
> 8a8d1d152e40
> [2.570276] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15: 
> 8a8d1ca68000
> [2.570281] FS:  () GS:8a8d3aa0()
> knlGS:
> [2.570287] CS:  0010 DS:  ES:  CR0: 80050033
> [2.570292] CR2: 0026 CR3: 0007e3dc6000 CR4: 
> 003406e0
> [2.570299] BUG: sleeping function called from invalid context at
> include/linux/percpu-rwsem.h:49
> [2.570306] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid:
> 667, name: uvd_enc_1.1
> [2.570311] INFO: lockdep is turned off.
> [2.570315] irq event stamp: 14
> [2.570319] hardirqs last  enabled at (13): []
> _raw_spin_unlock_irqrestore+0x46/0x60
> [2.570330] hardirqs last disabled at (14): []
> trace_hardirqs_off_thunk+0x1a/0x1c
> [2.570338] softirqs last  enabled at (0): []
> copy_process+0x706/0x1bc0
> [2.570345] softirqs last disabled at (0): [<>] 0x0
> [2.570351] CPU: 5 PID: 667 Comm: uvd_enc_1.1 Tainted: G  D
>   5.7.0-0.rc0.git6.1.2.fc33.x86_64 #1
> [2.570358] Hardware name: System manufacturer System Product
> Name/ROG STRIX X570-I GAMING, BIOS 1405 11/19/2019
> [2.570365] Call Trace:
> [2.570373]  dump_stack+0x8b/0xc8
> [2.570380]  ___might_sleep.cold+0xb6/0xc6
> [2.570385]  exit_signals+0x1c/0x2d0
> [2.570390]  do_exit+0xb1/0xc30
> [2.570395]  ? kthread+0x131/0x150
> [2.570400]  rewind_stack_do_exit+0x17/0x20
> [2.570559] [drm] Found VCE firmware Version: 57.6 Binary ID: 4
> [2.570572] [drm] PSP loading VCE firmware
> [3.146462] [drm] reserve 0x40 from 0x83fe80 for PSP TMR
> 
> $ /usr/src/kernels/`uname -r`/scripts/faddr2line
> /lib/debug/lib/modules/`uname -r`/vmlinux __kthread_should_park+0x5
> __kthread_should_park+0x5/0x30:
> 

Re: BUG: kernel NULL pointer dereference, address: 0000000000000026 after switching to 5.7 kernel

2020-04-11 Thread Christian König

Yeah, that is a known issue.

You could try the attached patch, but please be aware that it is not 
even compile tested because of the Easter holidays here.


Thanks,
Christian.

Am 10.04.20 um 21:51 schrieb Mikhail Gavrilov:

Hi folks.
After upgrade kernel to 5.7 I see every boot in kernel log following
error messages:

[2.569513] [drm] Found UVD firmware ENC: 1.2 DEC: .43 Family ID: 19
[2.569538] [drm] PSP loading UVD firmware
[2.570038] BUG: kernel NULL pointer dereference, address: 0026
[2.570045] #PF: supervisor read access in kernel mode
[2.570050] #PF: error_code(0x) - not-present page
[2.570055] PGD 0 P4D 0
[2.570060] Oops:  [#1] SMP NOPTI
[2.570065] CPU: 5 PID: 667 Comm: uvd_enc_1.1 Not tainted
5.7.0-0.rc0.git6.1.2.fc33.x86_64 #1
[2.570072] Hardware name: System manufacturer System Product
Name/ROG STRIX X570-I GAMING, BIOS 1405 11/19/2019
[2.570085] RIP: 0010:__kthread_should_park+0x5/0x30
[2.570090] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 02
83 e0
[2.570103] RSP: 0018:ad8141723e50 EFLAGS: 00010246
[2.570107] RAX: 7fff RBX: 8a8d1d116ed8 RCX: 
[2.570112] RDX:  RSI:  RDI: 
[2.570116] RBP: 8a8d28c11300 R08:  R09: 
[2.570120] R10:  R11:  R12: 8a8d1d152e40
[2.570125] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15: 8a8d1ca68000
[2.570131] FS:  () GS:8a8d3aa0()
knlGS:
[2.570137] CS:  0010 DS:  ES:  CR0: 80050033
[2.570142] CR2: 0026 CR3: 0007e3dc6000 CR4: 003406e0
[2.570147] Call Trace:
[2.570157]  drm_sched_get_cleanup_job+0x42/0x130 [gpu_sched]
[2.570166]  drm_sched_main+0x6f/0x530 [gpu_sched]
[2.570173]  ? lockdep_hardirqs_on+0x11e/0x1b0
[2.570179]  ? drm_sched_get_cleanup_job+0x130/0x130 [gpu_sched]
[2.570185]  kthread+0x131/0x150
[2.570189]  ? __kthread_bind_mask+0x60/0x60
[2.570196]  ret_from_fork+0x27/0x50
[2.570203] Modules linked in: fjes(-) amdgpu(+) amd_iommu_v2
gpu_sched ttm drm_kms_helper drm crc32c_intel igb nvme nvme_core dca
i2c_algo_bit wmi pinctrl_amd br_netfilter bridge stp llc fuse
[2.570223] CR2: 0026
[2.570228] ---[ end trace 80c25d326e1e0d7c ]---
[2.570233] RIP: 0010:__kthread_should_park+0x5/0x30
[2.570238] Code: 00 e9 fe fe ff ff e8 ca 3a 08 00 e9 49 fe ff ff
48 89 df e8 dd 38 08 00 84 c0 0f 84 6a ff ff ff e9 a6 fe ff ff 0f 1f
44 00 00  47 26 20 74 12 48 8b 87 88 09 00 00 48 8b 00 48 c1 e8 02
83 e0
[2.570250] RSP: 0018:ad8141723e50 EFLAGS: 00010246
[2.570255] RAX: 7fff RBX: 8a8d1d116ed8 RCX: 
[2.570260] RDX:  RSI:  RDI: 
[2.570265] RBP: 8a8d28c11300 R08:  R09: 
[2.570271] R10:  R11:  R12: 8a8d1d152e40
[2.570276] R13: 8a8d1d117280 R14: 8a8d1d116ed8 R15: 8a8d1ca68000
[2.570281] FS:  () GS:8a8d3aa0()
knlGS:
[2.570287] CS:  0010 DS:  ES:  CR0: 80050033
[2.570292] CR2: 0026 CR3: 0007e3dc6000 CR4: 003406e0
[2.570299] BUG: sleeping function called from invalid context at
include/linux/percpu-rwsem.h:49
[2.570306] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid:
667, name: uvd_enc_1.1
[2.570311] INFO: lockdep is turned off.
[2.570315] irq event stamp: 14
[2.570319] hardirqs last  enabled at (13): []
_raw_spin_unlock_irqrestore+0x46/0x60
[2.570330] hardirqs last disabled at (14): []
trace_hardirqs_off_thunk+0x1a/0x1c
[2.570338] softirqs last  enabled at (0): []
copy_process+0x706/0x1bc0
[2.570345] softirqs last disabled at (0): [<>] 0x0
[2.570351] CPU: 5 PID: 667 Comm: uvd_enc_1.1 Tainted: G  D
   5.7.0-0.rc0.git6.1.2.fc33.x86_64 #1
[2.570358] Hardware name: System manufacturer System Product
Name/ROG STRIX X570-I GAMING, BIOS 1405 11/19/2019
[2.570365] Call Trace:
[2.570373]  dump_stack+0x8b/0xc8
[2.570380]  ___might_sleep.cold+0xb6/0xc6
[2.570385]  exit_signals+0x1c/0x2d0
[2.570390]  do_exit+0xb1/0xc30
[2.570395]  ? kthread+0x131/0x150
[2.570400]  rewind_stack_do_exit+0x17/0x20
[2.570559] [drm] Found VCE firmware Version: 57.6 Binary ID: 4
[2.570572] [drm] PSP loading VCE firmware
[3.146462] [drm] reserve 0x40 from 0x83fe80 for PSP TMR

$ /usr/src/kernels/`uname -r`/scripts/faddr2line
/lib/debug/lib/modules/`uname -r`/vmlinux __kthread_should_park+0x5
__kthread_should_park+0x5/0x30:
to_kthread at kernel/kthread.c:75
(inlined by)