
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.
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.
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.
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 →
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.
For example, today's edition would include:
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 anything about this article. Q&As are published on this page for other readers too.
AI coding has moved through three stages—prompt engineering, context engineering, and now harness engineering—…

Workday is integrating its AI agents with Google Cloud's Gemini Enterprise, letting employees start tasks like…
Over the last two years, writing code syntax has become much easier, with tools like Cursor, Claude Code, and…

Meta released Pocket, a mobile app that lets users create interactive games and 'gizmos' by typing text prompt…

Z.ai, a Beijing-based AI startup, made public the details of its latest model on Friday

A third-year PhD student in NLP/interpretability reports that Claude Code now writes most experiment scaffoldi…
