]> git.hungrycats.org Git - linux/commit
vdso/datastore: Mark vdso_k_*_data pointers as __ro_after_init
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 13 May 2026 06:32:46 +0000 (08:32 +0200)
committerThomas Gleixner <tglx@kernel.org>
Tue, 2 Jun 2026 19:39:29 +0000 (21:39 +0200)
commit3f7fbde4cdd4a25c199a60849897459a63907ca5
tree9568956427d70e68709d07758706957e9ec210fe
parentce4abda5e12622f33450159e76c8f56d28d7f03d
vdso/datastore: Mark vdso_k_*_data pointers as __ro_after_init

These pointers are only modified once in vdso_setup_data_pages(),
during the init phase. Make them read-only after that.

Drop __refdata as that would conflict with __ro_after_init.
Modpost does accept the reference from a __ro_after_init symbol to
an __init one.

Fixes: 05988dba1179 ("vdso/datastore: Allocate data pages dynamically")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260513-vdso-ro-after-init-v1-1-4b51f74015a4@linutronix.de
lib/vdso/datastore.c