linux/include
Suren Baghdasaryan a8fc28dad6 alloc_tag: introduce clear_page_tag_ref() helper function
In several cases we are freeing pages which were not allocated using
common page allocators.  For such cases, in order to keep allocation
accounting correct, we should clear the page tag to indicate that the page
being freed is expected to not have a valid allocation tag.  Introduce
clear_page_tag_ref() helper function to be used for this.

Link: https://lkml.kernel.org/r/20240813150758.855881-1-surenb@google.com
Fixes: d224eb0287 ("codetag: debug: mark codetags for reserved pages as empty")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Sourav Panda <souravpanda@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>	[6.10]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-08-15 22:16:16 -07:00
..
acpi Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
asm-generic runtime constants: deal with old decrepit linkers 2024-08-03 08:38:45 -07:00
clocksource
crypto
drm drm/buddy: Add start address support to trim function 2024-08-07 18:19:00 -04:00
dt-bindings I3C for 6.11 2024-07-27 10:53:06 -07:00
keys
kunit
kvm
linux alloc_tag: introduce clear_page_tag_ref() helper function 2024-08-15 22:16:16 -07:00
math-emu
media
memory
misc
net sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
pcmcia
ras
rdma
rv
scsi Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
soc sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
sound ASoC: Fixes for v6.11 2024-08-09 09:58:07 +02:00
target
trace Including fixes from wireless, bleutooth, BPF and netfilter. 2024-08-01 09:42:09 -07:00
uapi uretprobe: change syscall number, again 2024-08-02 15:18:49 +02:00
ufs scsi: ufs: core: Check LSDBS cap when !mcq 2024-07-15 22:51:06 -04:00
vdso Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
video
xen Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00