mirror-linux/drivers/net/can
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>
2026-02-22 08:26:33 -08:00
..
c_can can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
cc770 can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
ctucanfd Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dev can: remove private CAN skb headroom infrastructure 2026-02-05 11:58:40 +01:00
esd can: convert generic HW timestamp ioctl to ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
flexcan can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
ifi_canfd can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
kvaser_pciefd can: convert generic HW timestamp ioctl to ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
m_can can: m_can: m_can_get_berr_counter(): don't wake up controller if interface is down 2025-10-17 15:17:19 +02:00
mscan can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
peak_canfd can: peak_canfd: convert to use ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
rcar can: rcar_canfd: Add RZ/T2H support 2026-01-16 20:51:18 +01:00
rockchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-10-23 10:53:08 -07:00
sja1000 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
slcan kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
softing Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
spi Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
usb Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
Kconfig Revert "can: raw: instantly reject unsupported CAN frames" 2026-01-15 09:52:04 +01:00
Makefile Revert "can: raw: instantly reject unsupported CAN frames" 2026-01-15 09:52:04 +01:00
at91_can.c can: at91_can: Fix memory leak in at91_can_probe() 2026-01-22 16:56:26 +01:00
bxcan.c can: bxcan: Fix a typo error for assign 2025-11-12 19:30:59 +01:00
can327.c kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
dummy_can.c can: add dummy_can driver 2025-11-26 11:20:44 +01:00
grcan.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
janz-ican3.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
sun4i_can.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-11-27 12:19:08 -08:00
ti_hecc.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
vcan.c can: propagate CAN device capabilities via ml_priv 2026-01-15 09:52:04 +01:00
vxcan.c can: gw: use can_gw_hops instead of sk_buff::csum_start 2026-02-05 11:58:40 +01:00
xilinx_can.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00