diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2023-02-10 22:16:04 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-17 05:43:51 +0100 |
commit | beb3c23c69a91a10f247e93ffef1fcd0209d93e4 (patch) | |
tree | b5c3d6e4e1d38541fc1e8f298f66e6f741012134 /lib/fdt_rw.c | |
parent | lib/stacktrace, kasan, kmsan: rework extra_bits interface (diff) | |
download | linux-beb3c23c69a91a10f247e93ffef1fcd0209d93e4.tar.xz linux-beb3c23c69a91a10f247e93ffef1fcd0209d93e4.zip |
lib/stackdepot: annotate racy pool_index accesses
Accesses to pool_index are protected by pool_lock everywhere except
in a sanity check in stack_depot_fetch. The read access there can race
with the write access in depot_alloc_stack.
Use WRITE/READ_ONCE() to annotate the racy accesses.
As the sanity check is only used to print a warning in case of a
violation of the stack depot interface usage, it does not make a lot
of sense to use proper synchronization.
[andreyknvl@google.com: s/pool_index/pool_index_cached/ in stack_depot_fetch()]
Link: https://lkml.kernel.org/r/95cf53f0da2c112aa2cc54456cbcd6975c3ff343.1676129911.git.andreyknvl@google.com
Link: https://lkml.kernel.org/r/359ac9c13cd0869c56740fb2029f505e41593830.1676063693.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/fdt_rw.c')
0 files changed, 0 insertions, 0 deletions