Subject: Re: [PATCH net-next] net: annotate data-races around sk->sk_lingertime

From: Jakub Kicinski <[email-masked]>
Date: Fri, 18 Aug 2023 19:28:50 -0700

On Fri, 18 Aug 2023 02:11:32 +0000 Eric Dumazet wrote:
> Remove preprocessor logic using BITS_PER_LONG, compilers
> are smart enough to figure this by themselves.

clang does complain that we're basically comparing an in to a MAX_LONG:

net/core/sock.c:1238:14: warning: result of comparison of constant 36893488147419103 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
                        if (t_sec >= MAX_SCHEDULE_TIMEOUT / HZ)
                            ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~

Can we shut this up somehow? Or don't care?