NVIDIA / NVIDIA/open-gpu-kernel-modules

kernel NULL pointer dereference while loading open modules

Open
#276 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
17.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

NVIDIA Open GPU Kernel Modules Version

515.48.07

Does this happen with the proprietary driver (of the same version) as well?

No

Operating System and Version

Gentoo

Kernel Release

5.15.41-gentoo

Hardware: GPU

NVIDIA GeForce GTX 1660 Ti

Describe the bug

Kernel modules not loading correctly on boot with resulting error on dmesg:

[    2.587928] nvidia: loading out-of-tree module taints kernel.
[    2.613674] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[    2.613694] BUG: kernel NULL pointer dereference, address: 0000000000000fa8
[    2.615816] #PF: supervisor write access in kernel mode
[    2.616883] #PF: error_code(0x0002) - not-present page
[    2.617941] PGD 112897067 P4D 112897067 PUD 112898067 PMD 0 
[    2.618999] Oops: 0002 [#1] PREEMPT SMP NOPTI
[    2.620053] CPU: 7 PID: 689 Comm: systemd-udevd Tainted: G           O      5.15.41-gentoo #1 6f8f0a11bd38f4c21163d9826a9b78d7146dd476
[    2.622175] RIP: 0010:nvlogInit+0x6/0xd0 [nvidia]
[    2.623317] Code: 02 00 00 48 c7 c2 50 92 27 a0 b9 04 00 00 00 49 c7 c0 99 1a 2a a0 41 b9 51 00 00 00 e9 5a ff ff ff cc cc cc 55 48 89 e5 53 50 <48> 89 3d 3b ef f3 5f b8 01 00 00 00 f0 0f c1 05 0a 03 35 00 85 c0
[    2.624417] RSP: 0018:ffffc900011c3ad8 EFLAGS: 00010246
[    2.625500] RAX: ffff8881030a5a20 RBX: 0000000000000000 RCX: 7b84692f55b0fd6e
[    2.626587] RDX: 7b84692fa2b82f30 RSI: 626fe721ab0fe25e RDI: 0000000000000000
[    2.627664] RBP: ffffc900011c3ae8 R08: 3c74d3cc85b8e837 R09: 94d049bb133111eb
[    2.628722] R10: bf58476d1ce4e5b9 R11: ffffffff8101e690 R12: ffffffff82411698
[    2.629773] R13: ffffc900011c3e80 R14: ffffc900011c3b40 R15: 0000000000000000
[    2.630812] FS:  00007f22c6004cc0(0000) GS:ffff88840edc0000(0000) knlGS:0000000000000000
[    2.631889] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    2.632893] CR2: 0000000000000fa8 CR3: 0000000102918000 CR4: 00000000003506e0
[    2.633895] Call Trace:
[    2.634884]  <TASK>
[    2.635862]  RmInitRm+0x74/0xa0 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.636895]  rm_init_rm+0x9/0x10 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.637925]  nvidia_init_module+0x30e/0x568 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.639027]  nvidia_init_module+0xba/0x568 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.640080]  ? nvidia_init_module+0x568/0x568 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.641113]  init_module+0x4d/0x91 [nvidia ca9271c5066cf2e07c50d68b3d6dbcb4c3731ede]
[    2.642137]  do_one_initcall+0x110/0x2b0
[    2.642142]  do_init_module+0x45/0x200
[    2.642143]  load_module+0x29be/0x2d70
[    2.642145]  ? kernel_read_file+0x208/0x250
[    2.642147]  ? kernel_read_file_from_fd+0x58/0x80
[    2.642149]  __x64_sys_finit_module+0xa8/0xd0
[    2.642151]  do_syscall_64+0x4a/0xb0
[    2.642154]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[    2.642156] RIP: 0033:0x7f22c610baa9
[    2.642158] Code: 08 44 89 e0 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 47 d3 0e 00 f7 d8 64 89 01 48
[    2.653055] RSP: 002b:00007ffc67018f18 EFLAGS: 00000206 ORIG_RAX: 0000000000000139
[    2.653056] RAX: ffffffffffffffda RBX: 00000000009c7a60 RCX: 00007f22c610baa9
[    2.653057] RDX: 0000000000000000 RSI: 00000000009c7360 RDI: 0000000000000005
[    2.653058] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000009c6510
[    2.653059] R10: 0000000000000005 R11: 0000000000000206 R12: 0000000000020000
[    2.653059] R13: 00000000009c7a60 R14: 00000000009c7360 R15: 0000000000981fc0
[    2.653061]  </TASK>
[    2.660922] Modules linked in: nvidia(O+)
[    2.660924] CR2: 0000000000000fa8
[    2.660925] ---[ end trace 15bfa3c085af75af ]---
[    2.660926] RIP: 0010:nvlogInit+0x6/0xd0 [nvidia]
[    2.665419] Code: 02 00 00 48 c7 c2 50 92 27 a0 b9 04 00 00 00 49 c7 c0 99 1a 2a a0 41 b9 51 00 00 00 e9 5a ff ff ff cc cc cc 55 48 89 e5 53 50 <48> 89 3d 3b ef f3 5f b8 01 00 00 00 f0 0f c1 05 0a 03 35 00 85 c0
[    2.665420] RSP: 0018:ffffc900011c3ad8 EFLAGS: 00010246
[    2.665421] RAX: ffff8881030a5a20 RBX: 0000000000000000 RCX: 7b84692f55b0fd6e
[    2.665422] RDX: 7b84692fa2b82f30 RSI: 626fe721ab0fe25e RDI: 0000000000000000
[    2.665422] RBP: ffffc900011c3ae8 R08: 3c74d3cc85b8e837 R09: 94d049bb133111eb
[    2.665423] R10: bf58476d1ce4e5b9 R11: ffffffff8101e690 R12: ffffffff82411698
[    2.672549] R13: ffffc900011c3e80 R14: ffffc900011c3b40 R15: 0000000000000000
[    2.672549] FS:  00007f22c6004cc0(0000) GS:ffff88840edc0000(0000) knlGS:0000000000000000
[    2.672550] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    2.672551] CR2: 0000000000000fa8 CR3: 0000000102918000 CR4: 00000000003506e0
To Reproduce

Build the driver via emerge with "kernel-open" use flag and reboot

Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by building with the "kernel-open" use flag via emerge and rebooting, then start from the nvlogInit and RmInitRm entries in the trace and review nvidia-bug-report.log.gz. Done means the open kernel module loads on the reported Gentoo and kernel configuration without the NULL pointer dereference.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.