net: add annotation for sock_{lock,unlock}_fast
authorPaolo Abeni <pabeni@redhat.com>
Tue, 17 Nov 2020 18:43:49 +0000 (19:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Nov 2020 18:00:54 +0000 (10:00 -0800)
commit12f4bd86225e348ef3a3c8d2bb42dc23ee0f0a4c
tree28f300cb67bffa2a9d8dae9d3b391c7e9002aba0
parentc3bc2adb051b27ad1d7fcef6ff80673915c43b0d
net: add annotation for sock_{lock,unlock}_fast

The static checker is fooled by the non-static locking scheme
implemented by the mentioned helpers.
Let's make its life easier adding some unconditional annotation
so that the helpers are now interpreted as a plain spinlock from
sparse.

v1 -> v2:
 - add __releases() annotation to unlock_sock_fast()

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/6ed7ae627d8271fb7f20e0a9c6750fbba1ac2635.1605634911.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sock.h
net/core/sock.c