Files
linux-net/drivers/gpu/drm/xe
Lucas De Marchi e5283bd4df drm/xe/reg_sr: Remove register pool
That pool implementation doesn't really work: if the krealloc happens to
move the memory and return another address, the entries in the xarray
become invalid, leading to use-after-free later:

	BUG: KASAN: slab-use-after-free in xe_reg_sr_apply_mmio+0x570/0x760 [xe]
	Read of size 4 at addr ffff8881244b2590 by task modprobe/2753

	Allocated by task 2753:
	 kasan_save_stack+0x39/0x70
	 kasan_save_track+0x14/0x40
	 kasan_save_alloc_info+0x37/0x60
	 __kasan_kmalloc+0xc3/0xd0
	 __kmalloc_node_track_caller_noprof+0x200/0x6d0
	 krealloc_noprof+0x229/0x380

Simplify the code to fix the bug. A better pooling strategy may be added
back later if needed.

Fixes: dd08ebf6c3 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-12-11 07:28:08 -08:00
..
2024-06-18 12:40:38 -07:00
2024-12-03 15:02:55 -05:00
2024-05-09 21:28:25 +02:00
2024-12-06 09:40:00 -05:00
2024-12-03 15:02:55 -05:00
2024-11-15 15:59:51 -08:00
2024-11-15 15:59:51 -08:00
2024-11-15 15:59:51 -08:00
2024-10-04 11:46:30 +02:00
2024-05-13 21:36:50 +02:00
2024-11-15 15:59:51 -08:00
2024-05-22 12:03:55 +02:00
2024-11-15 15:59:51 -08:00
2024-06-26 18:25:22 -04:00
2024-12-05 07:37:53 -08:00
2024-09-19 10:15:40 +02:00
2024-05-07 12:03:49 +02:00
2024-05-13 21:36:52 +02:00
2024-06-18 12:03:29 -07:00
2024-09-16 12:58:26 -07:00
2024-12-06 09:40:00 -05:00
2024-11-26 09:36:28 +00:00
2024-07-18 10:25:33 -04:00
2024-07-18 10:25:33 -04:00
2024-12-02 15:03:58 -05:00
2024-12-09 09:59:47 -05:00
2024-12-03 15:02:55 -05:00
2024-11-27 05:36:55 -05:00
2024-07-24 09:05:37 -07:00