/home/himanshu/clang-thread-safety-analysis/include/linux/kref.h:93:1: warning: mutex 'lock' is not held on every path through here [-Wthread-safety-analysis]
}
^
/home/himanshu/clang-thread-safety-analysis/include/linux/kref.h:88:6: note: mutex acquired here
if (refcount_dec_and_lock(&kref->refcount, lock)) {
^
https://elixir.bootlin.com/linux/v5.2-rc2/source/include/linux/kref.h#L84
release
is a pointer to the function that will clean up the object when the last reference to the object is released. There is no way better way here to let analysis know thatrelease
will do thespin_unlock
. Users: https://elixir.bootlin.com/linux/v5.2-rc2/source/net/sunrpc/svcauth.c#L158