Skip to content
Commit 22d4c291 authored by John Pittman's avatar John Pittman Committed by Mike Snitzer
Browse files

dm thin: use refcount_t for thin_c reference counting



The API surrounding refcount_t should be used in place of atomic_t
when variables are being used as reference counters.  It can
potentially prevent reference counter overflows and use-after-free
conditions.  In the dm thin layer, one such example is tc->refcount.
Change this from the atomic_t API to the refcount_t API to prevent
mentioned conditions.

Signed-off-by: default avatarJohn Pittman <jpittman@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent cef6f55a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment