[PATCH 3/4] fs, afs: convert afs_server.usage from atomic_t to refcount_t
David Howells
dhowells at redhat.com
Wed Feb 22 08:32:08 PST 2017
Elena Reshetova <elena.reshetova at intel.com> wrote:
> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
Although I don't see an assertion for this (the window is too small), it is
possible for a dead server record to get resurrected. Take a look at
afs_put_server() and note there's a check around the move to the graveyard.
So, please hold this patch also.
David
More information about the linux-afs
mailing list