Public bug reported:

Since linux 7.0.0-41.41 (resolute), the xe driver's SVM path can oops the
kernel (or, per other reports, corrupt memory silently) whenever a
device-private page migrated by the GPU is freed. Reproduced on an Intel
Arc Pro B70 (Battlemage, xe) with 7.0.0-44.44.

== Cause (as far as I can tell) ==

7.0.0-41.41 picked up, through the stable update "Resolute update: upstream
stable patchset 2026-10-06 (LP: #2169641), Upstream stable to v6.18.54,
v7.2.8":

  drm/pagemap: Prevent double migration of device pages
  (upstream c4126f1db36e)

That commit marks migrated device-private folios with a low bit in
zone_device_data and relies on every reader masking that bit when it
retrieves the drm_pagemap_zdd pointer. On upstream >= 7.1 all readers go
through the helper added by

  drm/pagemap: Add helper to access zone_device_data
  (upstream 2e03c0c5c59a, first in v7.1)

and its follow-ups. The 7.0 tree does not have that helper/series, so some
readers still use the raw zone_device_data. A page carrying the flag is
then freed through a pointer with the low bit set: refcount_warn_saturate,
then a general protection fault in drm_pagemap_zdd_destroy().

The XeStrata project (an LLM engine for Intel Arc) documents the same
analysis and observed the oops on Ubuntu 7.0.0 ABI >= 40 on 2026-11-18/19
(README "Ubuntu's kernel has the broken SVM change", AGENTS.md):
https://github.com/MistVVK/XeStrata

Kernels carrying the full upstream series (upstream 7.2.y / 7.3.y, e.g.
Fedora 44/45) are not affected; Ubuntu 7.0.0-38 and earlier do not have the
flag at all.

== Reproduction ==

Hardware: Intel Arc Pro B70 32 GB (xe), Intel Core i5-13600K, 128 GB RAM.
(An NVIDIA card was also installed but idle.)
Software: Ubuntu 26.04, linux-image-7.0.0-44-generic 7.0.0-44.44,
compute-runtime (libze-intel-gpu1) 26.40.40196.15, IGC 2.42.14,
Level Zero loader 1.34.0.

Workload: an LLM inference engine (Strata 0.2.25, SYCL / Level Zero) running
a model larger than VRAM, with part of the weights in host memory that both
CPU threads and the GPU access (shared/SVM allocations). The oops happened in
a CPU worker thread on the first request; a CPU page fault on a page that the
GPU had migrated led to the free path:

Oops: general protection fault, probably for non-canonical address 
0x98ffff8b2d8adc42: 0000 [#1] SMP NOPTI
CPU: 4 UID: 1001 PID: 12440 Comm: strata-pool-1 Tainted: G OE 7.0.0-44-generic 
#44-Ubuntu PREEMPT(lazy)
RIP: 0010:__raw_spin_lock_irqsave+0x27/0x80
Call Trace:
 _raw_spin_lock_irqsave+0xe/0x20
 complete_all+0x23/0xb0
 drm_pagemap_zdd_destroy+0x2d/0xc0 [drm_gpusvm_helper]
 drm_pagemap_folio_free+0x30/0x60 [drm_gpusvm_helper]
 free_zone_device_folio+0x116/0x1a0
 __folio_put+0x10a/0x120
 put_page+0x55/0x70
 do_swap_page+0xb2a/0xe00
 handle_pte_fault+0x1ad/0x1f0
 __handle_mm_fault+0x493/0x720
 handle_mm_fault+0xee/0x2e0
 do_user_addr_fault+0x1bb/0x860
 exc_page_fault+0x83/0x1e0
 asm_exc_page_fault+0x27/0x30
WARNING: lib/refcount.c:28 at refcount_warn_saturate+0x68/0xb0, CPU#0: 
strata/11818
Oops: general protection fault, probably for non-canonical address 
0x98ffff8b2d8adc32: 0000 [#2] SMP NOPTI

(The trace also passes through __drm_pagemap_migrate_to_ram /
drm_pagemap_migrate_to_ram.) Tainted O/E is only the NVIDIA module.

After the oops the process became a zombie with one thread stuck in D state
in exit_mmap; only a reboot cleared it.

The same machine ran the same engine in a mode with less CPU/GPU sharing for
~30 minutes afterwards without any kernel message, so the trigger depends on
how often the GPU migrates pages that the CPU then touches. XeStrata also
reports it with an image upscaler (ComfyUI SeedVR2) streaming blocks, so it is
not specific to one program.

== Impact ==

Any workload on xe (Arc B-series, and per XeStrata any xe GPU with SVM) that
uses shared/system allocations can crash the kernel or corrupt memory. The
only fixed kernel for resolute I can find is linux-hwe-7.3
(7.3.0-10.10~26.04.1), which is still in -proposed.

== Suggested fix ==

Either backport the zone_device_data helper series that c4126f1db36e depends
on (2e03c0c5c59a "drm/pagemap: Add helper to access zone_device_data" and the
patches that convert the readers), or revert "drm/pagemap: Prevent double
migration of device pages" from the 7.0 kernels until the dependency is in.

Affected: 7.0.0-41.41 through 7.0.0-44.44 (all current -updates/-security).
Not affected: 7.0.0-38.38 and earlier.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2190818

Title:
  resolute 7.0.0-41 and later: partial backport of "drm/pagemap: Prevent
  double migration of device pages" makes xe SVM free a tagged zdd
  pointer (GPF in drm_pagemap_zdd_destroy)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2190818/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to