Re: [PATCH] mm/rmap: convert anon_vma.refcount from atomic_t to refcount_t

2021-03-11 Thread Andrew Morton
On Thu, 11 Mar 2021 13:56:15 +0800 Yejune Deng wrote: > refcount_t type should be used instead of atomic_t when the variable > is used as a reference counter. This is because the implementation of > refcount_t can prevent overflows and detect possible use-after-free. The use of refcount_t comes

[PATCH] mm/rmap: convert anon_vma.refcount from atomic_t to refcount_t

2021-03-10 Thread Yejune Deng
refcount_t type should be used instead of atomic_t when the variable is used as a reference counter. This is because the implementation of refcount_t can prevent overflows and detect possible use-after-free. Signed-off-by: Yejune Deng --- include/linux/rmap.h | 7 --- mm/rmap.c|