linux/net/llc
Kees Cook 69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
..
af_llc.c net: Convert proto_ops connect() callbacks to use sockaddr_unsized 2025-11-04 19:10:32 -08:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
llc_c_ac.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
llc_c_ev.c net: llc: Correct some function names in header 2021-03-26 15:24:14 -07:00
llc_c_st.c llc: Constify struct llc_conn_state_trans 2024-07-15 08:51:01 -07:00
llc_conn.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
llc_core.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
llc_if.c llc: Check netns in llc_estab_match() and llc_listener_match(). 2023-07-20 10:46:28 +02:00
llc_input.c net: llc: reset skb->transport_header 2024-12-27 11:23:37 -08:00
llc_output.c llc/snap: constify dev_addr passing 2021-10-13 09:40:46 -07:00
llc_pdu.c net: llc: Correct function name llc_pdu_set_pf_bit() in header 2021-03-26 15:24:14 -07:00
llc_proc.c net: remove sock_i_uid() 2025-06-23 17:04:03 -07:00
llc_s_ac.c llc: do not use skb_get() before dev_queue_xmit() 2025-03-03 14:00:04 +00:00
llc_s_ev.c
llc_s_st.c llc: Constify struct llc_sap_state_trans 2024-07-15 08:51:19 -07:00
llc_sap.c llc: Constify struct llc_sap_state_trans 2024-07-15 08:51:19 -07:00
llc_station.c llc: verify mac len before reading mac header 2023-11-01 22:21:32 -07:00
Makefile llc: fix whitespace issues 2018-07-24 14:10:42 -07:00
sysctl_net_llc.c sysctl net: Remove macro checks for CONFIG_SYSCTL 2025-01-20 12:01:34 -08:00