Skip to content
Commit 4e66934e authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

lib: add reference counting tracking infrastructure



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>
parent ce83278f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment