Skip to content

Commit

Permalink
lib-stackdepot-annotate-racy-slab_index-accesses-fix
Browse files Browse the repository at this point in the history
enhance comment, per Marco

Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Andrew Morton committed Feb 1, 2023
1 parent c479a05 commit dc196d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stackdepot.c
Original file line number Diff line number Diff line change
@@ -271,7 +271,8 @@ depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc)

/*
* Move on to the next slab.
* WRITE_ONCE annotates a race with stack_depot_fetch.
* WRITE_ONCE pairs with potential concurrent read in
* stack_depot_fetch().
*/
WRITE_ONCE(slab_index, slab_index + 1);
slab_offset = 0;

0 comments on commit dc196d5

Please sign in to comment.