Skip to content

Kernel panic with v7.3.4-zen1 due to NULL pointer dereference #425

Closed

Description

@oynqr

I tried updating to zen-kernel 7.3.4-zen1, but was met with a kernel panic on boot. The last version I ran was 7.2.15-zen1 and that was working without issues. Plain Linux 7.3.4 works without issues as well. I got this panic trace from the kernel:

[    3.211398]  ? srso_alias_return_thunk+0x5/0xfbef5
[    3.211402]  bh_worker+0x1a6/0x1d0
[    3.211404]  ? srso_alias_return_thunk+0x5/0xfbef5
[    3.211406]  ? srso_alias_return_thunk+0x5/0xfbef5
[    3.211408]  tasklet_action+0x10/0x30
[    3.211410]  handle_softirqs+0xde/0x290
[    3.211413]  ? __pfx_smpboot_thread_fn+0x10/0x10
[    3.211416]  run_ksoftirqd+0x2f/0x40
[    3.211417]  smpboot_thread_fn+0xf6/0x220
[    3.211419]  kthread+0xe6/0x120
[    3.211421]  ? __pfx_kthread+0x10/0x10
[    3.211423]  ret_from_fork+0x2ab/0x340
[    3.211426]  ? __pfx_kthread+0x10/0x10
[    3.211427]  ret_from_fork_asm+0x1a/0x30
[    3.211431]  </TASK>
[    3.211432] Modules linked in: xhci_pci(E+) nvme_keyring(E) thunderbolt(E+) scsi_common(E) xhci_hcd(E) nvme_auth(E) amdgpu(E+) drm_buddy(E) amdxcp(E) i2c_algo_bit(E) drm_ttm_helper(E) ttm(E) drm_exec(E) drm_panel_backlight_quirks(E) gpu_sched(E) drm_suballoc_helper(E) video(E) wmi(E) drm_display_helper(E) dm_mod(E) cec(E) crc16(E) configfs(E) efivarfs(E) autofs4(E)
[    3.211449] CR2: 0000000000000138
[    3.211451] ---[ end trace 0000000000000000 ]---
[    3.217627] amdgpu: vga_switcheroo: detected switching method \_SB_.PCI0.GP17.VGA_.ATPX handle
[    3.217791] amdgpu: ATPX version 1, functions 0x00000000
[    3.255422] amdgpu: Virtual CRAT table created for CPU
[    3.255442] amdgpu: Topology: Add CPU node
[    3.255552] amdgpu 0000:03:00.0: enabling device (0006 -> 0007)
[    3.255600] amdgpu 0000:03:00.0: initializing kernel modesetting (IP DISCOVERY 0x1002:0x747E 0x148C:0x2427 0xC8).
[    3.255611] amdgpu 0000:03:00.0: register mmio base: 0xDCE00000
[    3.255612] amdgpu 0000:03:00.0: register mmio size: 1048576
[    3.260664] pstore: backend (efi_pstore) writing error (-28)
[    3.260666] RIP: 0010:process_one_work+0xb5/0x3d0
[    3.260668] Code: 89 1a 48 89 53 08 4c 89 7b 10 49 8b 47 18 48 89 6b 20 48 89 43 18 48 8b 43 58 48 85 c0 74 0b 48 8b 90 38 01 00 00 48 89 53 28 <48> 8b 80 38 01 00 00 be 20 00 00 00 48 89 43 28 48 8b 05 94 af 09
[    3.260670] RSP: 0018:ffffd034804b7dc0 EFLAGS: 00010046
[    3.260671] RAX: 0000000000000000 RBX: ffff8eddd03d1c80 RCX: ffff8edde2cfd9d0
[    3.260672] RDX: ffff8efc9dd41b88 RSI: ffff8edde2cfd9d0 RDI: ffff8eddd03d1c80
[    3.260673] RBP: ffff8eddd0811c00 R08: ffff8eddd03d1cc8 R09: ffff8efc9dd419e0
[    3.260674] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8efc9dd419c0
[    3.260675] R13: ffff8eddd03d1cc8 R14: 000000000000000a R15: ffff8edde2cfd9d0
[    3.260676] FS:  0000000000000000(0000) GS:ffff8efce2a23000(0000) knlGS:0000000000000000
[    3.260677] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.260678] CR2: 0000000000000138 CR3: 0000001227422000 CR4: 0000000000f50ef0
[    3.260679] PKRU: 55555554
[    3.260681] Kernel panic - not syncing: Fatal exception in interrupt
[    3.261190] Kernel Offset: 0x36e00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)

After looking at the process_one_work function, I found that one of the worker->current_at assignments seems to be duplicated (possibly due to a mis-merge?):

zen-kernel/kernel/workqueue.c

Lines 3327 to 3333 in 75e5288

if (worker->task)
#ifdef CONFIG_SCHED_ALT
worker->current_at = worker->task->sched_time;
#else
worker->current_at = READ_ONCE(worker->task->se.sum_exec_runtime);
worker->current_at = worker->task->se.sum_exec_runtime;
#endif

Since the duplicate line runs outside of the if (worker->task), it causes a NULL pointer dereference whenever worker->task is NULL, which seems to be the case with BH workers.

I have a patch in my copy of nixpkgs that fixes this issue for me: https://github.com/oynqr/nixpkgs/blob/8761d327baa1af3695e1a314b7b22143640984bf/pkgs/os-specific/linux/kernel/zen-fix-null-deref.patch

Activity

  1. TheK3nsai commented on Nov 11, 2026

    @TheK3nsai

    Same panic on Intel (Tiger Lake-H laptop) with 7.3.4-zen1; 7.2.15-zen1 was fine.

    • BUG: kernel NULL pointer dereference, address: 00000000000000f8 at process_one_work+0xb9/0x3e0, via bh_worker → tasklet_action in ksoftirqd/0
    • Triggered right after the Thunderbolt 4 xHCI (8086:9a17) registers its buses during built-in xhci_pci_init
    • scripts/faddr2line vmlinux process_one_work+0xb9/0x3e0 → kernel/workqueue.c:3332, the duplicated worker->current_at = worker->task->se.sum_exec_runtime; line

    Deleting that one line (same change as your patch) fixes it; the machine boots and runs normally.

    For anyone searching: with quiet splash this looks like a silent hang on a blank screen, because it panics before fbcon takes over the display, and nothing reaches the journal or pstore. Booting once with earlycon=efifb keep_bootcon shows the trace.

  2. damentz commented on Nov 11, 2026

    @damentz
    Member

    @TheK3nsai should be resolved as of d0c3b48

    @heftig you'll need to push out a new 7.3 update from 7.3/main to add this fix.

  3. added a commit that references this issue on Nov 12, 2026
    d0c3b48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions