linux/drivers/gpu/drm
Kees Cook 189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
History 2026-02-22 08:26:33 -08:00
..
adp drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
amd Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
arm Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
armada Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aspeed drm/aspeed: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:06 +01:00
ast Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
atmel-hlcdc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bridge Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ci mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
clients Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
display Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
etnaviv Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
exynos Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
fsl-dcu Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gma500 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
gud Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
hisilicon drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init. 2026-01-20 10:53:14 +02:00
hyperv drm/hyperv: Remove reference to hyperv_fb driver 2026-02-14 11:09:38 +01:00
i915 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
imagination Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imx Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ingenic Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kmb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
lib drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
lima Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
logicvc drm/logicvc: Switch to drm_atomic_get_new_crtc_state() 2025-10-06 13:59:15 +02:00
loongson Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mcde drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
mediatek Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
meson drm/meson/dw-hdmi: convert to of_drm_find_and_get_bridge() 2026-01-21 13:59:56 +01:00
mgag200 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
msm Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
mxsfb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nouveau Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
nova drm/nova: Align GEM memory allocation to system page size 2025-12-29 15:43:20 +01:00
omapdrm Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
panel Several fixes for amdxdna around PM handling, error reporting and 2026-02-06 12:52:15 +10:00
panfrost Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
panthor Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
pl111 Linux 6.19-rc7 2026-01-28 12:44:28 +10:00
qxl Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
radeon Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
renesas Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rockchip Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
scheduler Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sitronix Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
solomon Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sprd drm/sprd: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:01 -04:00
sti Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
stm drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
sun4i Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sysfb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tests Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tidss Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tilcdc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tiny Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ttm Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
tve200 drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
tyr Driver core changes for 7.0-rc1 2026-02-11 17:43:59 -08:00
udl Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
v3d Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
vboxvideo Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vc4 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vgem Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
virtio Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vkms Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vmwgfx Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
xe Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
xen Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
xlnx Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_atomic.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
drm_atomic_helper.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_atomic_state_helper.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_atomic_uapi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_auth.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_blend.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_bridge.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_bridge_helper.c drm/bridge: Include <linux/export.h> 2025-06-16 09:02:25 +02:00
drm_buddy.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
drm_cache.c drm/gpu: Remove dead checks on wbinvd_on_all_cpus()'s return value 2025-07-10 13:07:26 +02:00
drm_client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_client_event.c drm/client: Pass force parameter to client restore 2025-11-25 08:43:46 +01:00
drm_client_modeset.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
drm_client_sysrq.c drm/client: Support emergency restore via sysrq for all clients 2025-11-25 08:43:47 +01:00
drm_color_mgmt.c drm: Add Enhanced LUT precision structure 2025-11-26 23:03:35 +01:00
drm_colorop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_connector.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_crtc.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
drm_crtc_helper.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
drm_crtc_helper_internal.h drm/connector: make mode_valid take a const struct drm_display_mode 2025-01-07 12:45:19 +02:00
drm_crtc_internal.h drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 2025-11-26 23:03:32 +01:00
drm_damage_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_debugfs.c drm/debug: don't register files for unsupported HDMI InfoFrames 2026-01-19 13:11:47 +02:00
drm_debugfs_crc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_displayid.c drm/displayid: add quirk to ignore DisplayID checksum errors 2025-11-04 14:49:30 +02:00
drm_displayid_internal.h drm/displayid: add quirk to ignore DisplayID checksum errors 2025-11-04 14:49:30 +02:00
drm_draw.c drm/draw: add drm_draw_can_convert_from_xrgb8888 2025-12-19 23:06:41 +01:00
drm_draw_internal.h drm/draw: add drm_draw_can_convert_from_xrgb8888 2025-12-19 23:06:41 +01:00
drm_drv.c drm/client: Support emergency restore via sysrq for all clients 2025-11-25 08:43:47 +01:00
drm_dumb_buffers.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
drm_edid.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_edid_load.c drm/edid/firmware: Remove built-in EDIDs 2024-02-26 14:05:18 +01:00
drm_eld.c drm/edid: move all internal declarations to drm_crtc_internal.h 2024-04-17 16:11:17 +03:00
drm_encoder.c drm/encoder: register per-encoder debugfs dir 2023-12-04 16:07:29 +02:00
drm_exec.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_fb_dma_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_fb_helper.c Linux 6.19-rc7 2026-01-28 12:44:28 +10:00
drm_fbdev_dma.c drm/fb-helper: Allocate and release fb_info in single place 2025-11-25 11:02:43 +01:00
drm_fbdev_shmem.c drm/fb-helper: Allocate and release fb_info in single place 2025-11-25 11:02:43 +01:00
drm_fbdev_ttm.c drm/fb-helper: Allocate and release fb_info in single place 2025-11-25 11:02:43 +01:00
drm_file.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_flip_work.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
drm_format_helper.c drm/format-helper: Remove drm_fb_blit() 2025-09-23 15:06:06 +02:00
drm_format_internal.h drm/format-helper: Split off byte swapping from drm_fb_xrgb8888_to_rgb565() 2025-06-27 15:59:23 +02:00
drm_fourcc.c drm: Pass pixel_format+modifier directly to drm_get_format_info() 2025-07-16 20:01:13 +03:00
drm_framebuffer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gem_atomic_helper.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_gem_dma_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gem_framebuffer_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gem_shmem_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gem_ttm_helper.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
drm_gem_vram_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gpusvm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_gpuvm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_internal.h drm/client: Support emergency restore via sysrq for all clients 2025-11-25 08:43:47 +01:00
drm_ioc32.c drm/ioc32: replace __attribute__((packed)) with __packed 2023-12-14 12:16:58 +02:00
drm_ioctl.c drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 2025-11-26 23:03:32 +01:00
drm_kms_helper_common.c drm/edid/firmware: drop drm_kms_helper.edid_firmware backward compat 2023-11-21 12:22:48 +02:00
drm_lease.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_managed.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_mipi_dbi.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
drm_mipi_dsi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_mm.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
drm_mode_config.c drm/colorop: Introduce new drm_colorop mode object 2025-11-26 23:03:30 +01:00
drm_mode_object.c drm/mode_object: add drm_object_immutable_property_get_value() 2026-01-14 02:18:31 +02:00
drm_modes.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_modeset_helper.c drm/client: Remove holds_console_lock parameter from suspend/resume 2025-10-18 17:35:09 +02:00
drm_modeset_lock.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
drm_of.c drm: of: fix documentation reference 2025-08-21 16:21:08 +02:00
drm_pagemap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_pagemap_util.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_panel.c drm/panel: Allow powering on panel follower after panel is enabled 2025-08-25 09:17:49 -07:00
drm_panel_backlight_quirks.c drm: panel-backlight-quirks: Add Steam Deck brightness quirk 2025-09-03 10:23:03 -05:00
drm_panel_orientation_quirks.c drm/panel: Include <linux/export.h> 2025-06-16 09:02:39 +02:00
drm_panic.c drm/panic: Fix expected string for QR_CODE in drm_panic_type_map 2026-01-09 08:53:27 +00:00
drm_panic_qr.rs drm/panic: use core::ffi::CStr method names 2025-09-16 09:26:59 +02:00
drm_pci.c drm: Do not include <linux/export.h> 2025-06-16 09:00:09 +02:00
drm_plane.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_plane_helper.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
drm_prime.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_print.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_privacy_screen.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_privacy_screen_x86.c drm-misc-next for v5.18: 2022-02-01 19:02:41 +10:00
drm_probe_helper.c drm/probe-helper: put the bridge returned by drm_bridge_chain_get_first_bridge() 2025-07-22 13:01:28 +02:00
drm_property.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_rect.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_self_refresh_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_simple_kms_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_suballoc.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
drm_syncobj.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_trace.h drm: Add high-precision time to vblank trace event 2019-09-03 09:46:18 +02:00
drm_trace_points.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vblank.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_vblank_helper.c drm/vblank: Add CRTC helpers for simple use cases 2025-10-01 08:32:00 +02:00
drm_vblank_work.c drm/vblank: use drm_crtc_vblank_crtc() in workers 2025-11-10 13:22:58 +02:00
drm_vma_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_writeback.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
Kconfig Partly revert "drm/hyperv: Remove reference to hyperv_fb driver" 2026-02-14 14:38:23 -08:00
Kconfig.debug drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers 2025-06-18 10:46:03 +02:00
Makefile Kbuild/Kconfig updates for 7.0 2026-02-11 13:40:35 -08:00