Re: [PATCH net-next] net: add annotation for sock_{lock,unlock}_fast

2020-11-17 Thread Paolo Abeni
Hello, On Tue, 2020-11-17 at 17:58 +0100, Luc Van Oostenryck wrote: > On Tue, Nov 17, 2020 at 09:38:45AM +0100, Paolo Abeni wrote: > > Hello, > > > > Thank you for the feedback! > > > > On Mon, 2020-11-16 at 23:27 +0100, Luc Van Oostenryck wrote: > > > > @@ -1606,10 +1607,12 @@ bool lock_sock_fa

Re: [PATCH net-next] net: add annotation for sock_{lock,unlock}_fast

2020-11-17 Thread Luc Van Oostenryck
On Tue, Nov 17, 2020 at 09:38:45AM +0100, Paolo Abeni wrote: > Hello, > > Thank you for the feedback! > > On Mon, 2020-11-16 at 23:27 +0100, Luc Van Oostenryck wrote: > > > @@ -1606,10 +1607,12 @@ bool lock_sock_fast(struct sock *sk); > > > */ > > > static inline void unlock_sock_fast(struct s

Re: [PATCH net-next] net: add annotation for sock_{lock,unlock}_fast

2020-11-17 Thread Paolo Abeni
Hello, Thank you for the feedback! On Mon, 2020-11-16 at 23:27 +0100, Luc Van Oostenryck wrote: > > @@ -1606,10 +1607,12 @@ bool lock_sock_fast(struct sock *sk); > > */ > > static inline void unlock_sock_fast(struct sock *sk, bool slow) > > { > > - if (slow) > > + if (slow) { > >

Re: [PATCH net-next] net: add annotation for sock_{lock,unlock}_fast

2020-11-16 Thread Luc Van Oostenryck
On Mon, Nov 16, 2020 at 11:36:39AM +0100, Paolo Abeni wrote: > 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 >

[PATCH net-next] net: add annotation for sock_{lock,unlock}_fast

2020-11-16 Thread Paolo Abeni
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. Signed-off-by: Paolo Abeni --- include/net/sock.h | 9 +