summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2025-01-08 12:04:32 +0300
committerPetr Pavlu <petr.pavlu@suse.com>2025-03-10 13:54:44 +0300
commit039de46874bb08fef027342c9c5077f2ea85ab42 (patch)
treec70777059d32bb2741ea0ef28440afaa539d7743 /scripts/lib
parent838e6dd8b59262d0b59041d65d21331daa83dd36 (diff)
downloadlinux-039de46874bb08fef027342c9c5077f2ea85ab42.tar.xz
module: Use proper RCU assignment in add_kallsyms().
add_kallsyms() assigns the RCU pointer module::kallsyms and setups the structures behind it which point to init-data. The module was not published yet, nothing can see the kallsyms pointer and the data behind it. Also module's init function was not yet invoked. There is no need to use rcu_dereference() here, it is just to keep checkers quiet. The whole RCU read section is also not needed. Use a local kallsyms pointer and setup the data structures. Assign that pointer to the data structure at the end via rcu_assign_pointer(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250108090457.512198-4-bigeasy@linutronix.de Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions