lib/ref_tracker: add unlocked leak print helper
authorAndrzej Hajda <andrzej.hajda@intel.com>
Fri, 2 Jun 2023 10:21:33 +0000 (12:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 5 Jun 2023 22:28:42 +0000 (15:28 -0700)
commit7a113ff6355944283402fb617dc97122f68d5a41
tree43cf4ce7a6efb9d5672475efbd53b776d5ff0efa
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4
lib/ref_tracker: add unlocked leak print helper

To have reliable detection of leaks, caller must be able to check under
the same lock both: tracked counter and the leaks. dir.lock is natural
candidate for such lock and unlocked print helper can be called with this
lock taken.
As a bonus we can reuse this helper in ref_tracker_dir_exit.

Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ref_tracker.h
lib/ref_tracker.c