| From: Andrew Morton <akpm@linux-foundation.org> |
| Subject: lib-stackdepot-annotate-racy-slab_index-accesses-fix |
| Date: Tue Jan 31 01:10:50 PM PST 2023 |
| |
| 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> |
| --- |
| |
| |
| --- a/lib/stackdepot.c~lib-stackdepot-annotate-racy-slab_index-accesses-fix |
| +++ a/lib/stackdepot.c |
| @@ -271,7 +271,8 @@ depot_alloc_stack(unsigned long *entries |
| |
| /* |
| * 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; |
| _ |