• Eric Dumazet's avatar
    lib: add reference counting tracking infrastructure · 4e66934e
    Eric Dumazet authored
    It can be hard to track where references are taken and released.
    
    In networking, we have annoying issues at device or netns dismantles,
    and we had various proposals to ease root causing them.
    
    This patch adds new infrastructure pairing refcount increases
    and decreases. This will self document code, because programmers
    will have to associate increments/decrements.
    
    This is controled by CONFIG_REF_TRACKER which can be selected
    by users of this feature.
    
    This adds both cpu and memory costs, and thus should probably be
    used with care.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    4e66934e
Makefile 13.4 KB