Re: [PATCH v4 12/22] lib/stackdepot: use read/write lock
From: Andi Kleen
Date: Sat Jan 13 2024 - 04:31:20 EST
> This function is only refilling the freelist. Readers don't see it yet
> because it's in none of the hash table buckets. The freelist is only
> ever accessed under the lock.
>
> Once an entry is allocated from the freelist, its size is overwritten
> with something non-zero (since it then contains a stack trace). Those
> updates are released into the right hash table bucket with
> list_add_rcu() (which implies a release).
>
> Am I missing something else?
It's probably ok semantically here, but at least I would be consistent with
using the macro for a specific field.
-Andi