diff --git a/net/core/sock.c b/net/core/sock.c index 252d21a1bb04548068ce660e3c5064e473aa40c1..091032a250c7e0da5e8ccd1830ecbdc3acb90866 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) return -EDOM; if (tv.tv_sec < 0) { - static int warned = 0; + static int warned __read_mostly; + *timeo_p = 0; if (warned < 10 && net_ratelimit()) warned++;