AIToday
AI Coding AssistantsHacker NewsPublished: Aug 22, 2026, 01:02 JST2 min read

Linus Torvalds fixes Intel GPU driver bug with one-line patch

Linus Torvalds fixes Intel GPU driver bug with one-line patch

Key takeaway

  • Linus Torvalds debugged an Intel GPU driver bug where incorrect memory alignment caused kernel crashes and screen corruption.

  • The Xe driver was rounding up a memory address to the nearest 128kB, causing writes to unintended memory regions.

  • He committed a one-line fix that prevents the misaligned memory from being used as VRAM.

3 Key Points

  1. What happened

    Linus Torvalds debugged and fixed a kernel bug in Intel's Xe GPU driver where the driver incorrectly rounded up a memory address used for CCS (Compute Core Scratch) storage to the nearest 128kB boundary, causing the driver and hardware engine to write to memory outside that boundary. The fix was committed as a one-liner patch that prevents the driver from handing out the flat CCS storage as usable VRAM.

  2. Why it matters

    The bug caused kernel job timeouts that Torvalds could reproduce at will. When the misaligned memory happened to overlap with GPU page tables, it triggered severe corruption; when it overlapped other data, it caused random screen corruption. The issue originated in an earlier commit from two years ago but only became consistently reproducible recently due to a change in user space behavior.

  3. What to watch

    The patch addresses a longstanding memory alignment flaw in the Xe driver. Torvalds notes he spent a full day debugging the issue between merge window work, and the fix is expected to resolve both the predictable kernel timeouts and the occasional random screen corruption users had been experiencing.

Ask the AI about this article →

Context & Analysis

The bug represents a subtle but critical memory alignment issue in Intel's Xe GPU driver. The problem lay in how the driver managed memory stolen for CCS (Compute Core Scratch) — a performance feature used in modern Intel GPUs. By rounding up the memory address to a 128kB boundary without accounting for where that boundary fell, the driver inadvertently created a window where both the driver and the hardware engine could write to unallocated or already-allocated memory regions.

What made this bug particularly difficult to track was its non-deterministic impact. When the misaligned memory region overlapped with GPU page tables — the structures that map virtual memory to physical memory — the corruption was severe and immediate, manifesting as kernel timeouts. But in cases where the misaligned region contained less critical bitmap or texture data, the corruption went unnoticed until it manifested as intermittent screen glitches. This explains why Torvalds observed both predictable kernel job timeouts and occasional random screen corruption in the wild.

The two-year gap between the introduction of the bug and its becoming reliably reproducible suggests the issue was always latent, but user space behavior changes (such as different memory allocation patterns or GPU usage profiles) finally triggered consistent exposure of the flaw, allowing Torvalds to reproduce it reliably and fix it.

FAQ

What caused the GPU driver bug?
The Xe driver was rounding up a memory address used for CCS storage to the nearest 128kB boundary, which meant the driver and hardware engine would write to memory outside that boundary. When that memory was used for GPU page tables, it caused severe corruption.
How long had this bug existed?
The problem originated in commit 37173392741c two years ago, but only became consistently reproducible recently due to a change in user space behavior.
What was the fix?
Torvalds committed a one-liner patch (commit 818bebeb63dd) that prevents the driver from handing out the flat CCS storage as usable VRAM, ensuring the memory address is not incorrectly rounded up.

Get the latest AI Coding Assistants news every morning

For example, today's edition would include:

  • AI Coding Shifts from Prompts to Context to HarnessITmedia AI+ · 11h ago
  • Workday brings AI agents into Gmail, keeping ERP guardrailsSiliconANGLE AI · 13h ago
  • Software engineers shift from coding to designing AI agent boundariesVentureBeat AI · 13h ago

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleYouTube creators face backlash for unpaid Higgsfield AI promotion