tcp: debugging patch to warn if timer set for 0 jiffies in the future
[ Testing fix for the patch series in b/308472523 / b/308151197
Any code path that sets a timer for 0 jiffies into the future runs a
risk of busy-looping for long periods, which would match the
symptoms of the traces in b/308472523 ... ]
Google-Bug-Id: 308151197
Change-Id: I1e15042ec858308d1274880446d71822053e3415
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/61182
Tested-by: Brian Vazquez <brianvv@google.com>
Reviewed-by: Brian Vazquez <brianvv@google.com>
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 695ed45..06c3e75 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -224,6 +224,7 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what,
sk, what, when, (void *)_THIS_IP_);
when = max_when;
}
+ WARN_ONCE(when == 0, "what=%d", what);
if (what == ICSK_TIME_RETRANS || what == ICSK_TIME_PROBE0 ||
what == ICSK_TIME_LOSS_PROBE || what == ICSK_TIME_REO_TIMEOUT) {