tipc_crypto_rekeying_sched() converts the rekeying interval, given in minutes, to milliseconds in 32 bits: delay = (now) ? 0 : tx->rekeying_intv * 60 * 1000; TIPC_NLA_NODE_REKEYING accepts any u32, so intervals of 71583 minutes and more wrap. An interval of 134217728 minutes gives a delay of 0. The TX rekeying work then requeues itself without delay, and while its new key waits for a peer to take it, each run goes straight back to the requeue: a kworker spins until the key is flushed or the interval is changed. Compute the delay in jiffies in 64 bits and cap it at MAX_JIFFY_OFFSET, the largest delay msecs_to_jiffies() returns. Fixes: 23700da29b83 ("tipc: add automatic rekeying for encryption key") Signed-off-by: Kyuwon Cho --- The issue was found by an LLM-guided test generator that we are developing as a research prototype. A reproducer, which runs as any user with iproute2's tipc tool: $ unshare -Urn sh -e <<'END' tipc node set identity 1111111111111111 tipc node set key this_is_a_master_key master tipc node set key rekeying 134217728 sleep 3 END Without the patch, a kworker keeps one CPU busy until the namespace goes away (about 300 ticks of system time in three seconds on a 2-CPU VM, against 2 before the last command); with it, the system time stays at the idle level. The patch was written with LLM assistance; we reviewed and tested it. net/tipc/crypto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index 4409bdb70fe9..ef08524ce2ca 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -2417,8 +2417,9 @@ void tipc_crypto_rekeying_sched(struct tipc_crypto *tx, bool changed, } if (tx->rekeying_intv || now) { - delay = (now) ? 0 : tx->rekeying_intv * 60 * 1000; - queue_delayed_work(tx->wq, &tx->work, msecs_to_jiffies(delay)); + delay = now ? 0 : min_t(u64, (u64)tx->rekeying_intv * 60 * HZ, + MAX_JIFFY_OFFSET); + queue_delayed_work(tx->wq, &tx->work, delay); } } -- 2.43.0