]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/rmap: convert from atomic_t to refcount_t on anon_vma->refcount
authorXiyu Yang <xiyuyang19@fudan.edu.cn>
Mon, 23 Aug 2021 23:59:44 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:26 +0000 (09:34 +1000)
commit8e0f4444f7d4e59575000210268340610c37dac1
tree1885e2abe00e75bb0e23d946d41596b15af8ffa7
parentaa6da1c42ef3d108f5aa80237f032cd11a27ea5b
mm/rmap: convert from atomic_t to refcount_t on anon_vma->refcount

refcount_t type and corresponding API can protect refcounters from
accidental underflow and overflow and further use-after-free situations.

Link: https://lkml.kernel.org/r/1626665029-49104-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: <yuanxzhang@fudan.edu.cn>
Cc: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
include/linux/rmap.h
mm/rmap.c