Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\refcount.h Create Date:2022-07-28 05:38:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_sub_and_test - subtract from a refcount and test if it is 0*@i: amount to subtract from the refcount*@r: the refcount* Similar to atomic_dec_and_test(), but it will WARN, return false and* ultimately leak on underflow and will fail to decrement when

Proto:static inline __must_check bool refcount_sub_and_test(int i, refcount_t *r)

Type:bool

Parameter:

TypeParameterName
inti
refcount_t *r
253  old = atomic_fetch_sub_release(i, & refs)
255  If old == i Then
256  smp_acquire__after_ctrl_dep() - Provide ACQUIRE ordering after a control dependency* A control dependency provides a LOAD->STORE order, the additional RMB* provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order,* aka. (load)-ACQUIRE.()
257  Return true
260  If Value for the false possibility is greater at compile time(old < 0 || old - i < 0) Then refcount_warn_saturate(r, REFCOUNT_SUB_UAF)
263  Return false
Caller
NameDescribe
mem_cgroup_id_put_many
__io_double_put_req
io_double_put_req
io_wq_managerManager thread. Tasked with creating new workers, if we need them.