[PATCH 2/4] fs, afs: convert afs_vlocation.usage from atomic_t to refcount_t

David Howells dhowells at redhat.com
Wed Feb 22 08:22:12 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.

Please hold this patch also.  An assertion failure may happen here too because
afs_vlocation_lookup() may resurrect records with a refcount of 0 from the
cache.

David



More information about the linux-afs mailing list