Commit 8719ee2d authored by John Pittman's avatar John Pittman Committed by Yongqiang Liu
Browse files

dm thin: use refcount_t for thin_c reference counting

mainline inclusion
from mainline-v4.20-rc1
commit 22d4c291
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5KSEX


CVE: NA

--------------------------------

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>
Signed-off-by: default avatarLuo Meng <luomeng12@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 72b32d44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment