]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: do not pass flow_id to set_rps_cpu()
authorEric Dumazet <edumazet@google.com>
Fri, 20 Feb 2026 22:26:05 +0000 (22:26 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Feb 2026 01:07:34 +0000 (17:07 -0800)
commit8a8a9fac9efa6423fd74938b940cb7d731780718
tree4fa22788c8eb416cc14fd7c0672eef3175019b0e
parent41e09ec73d7431dffda01b1e7208a272a5c90fb9
net: do not pass flow_id to set_rps_cpu()

Blamed commit made the assumption that the RPS table for each receive
queue would have the same size, and that it would not change.

Compute flow_id in set_rps_cpu(), do not assume we can use the value
computed by get_rps_cpu(). Otherwise we risk out-of-bound access
and/or crashes.

Fixes: 48aa30443e52 ("net: Cache hash and flow_id to avoid recalculation")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Krishna Kumar <krikku@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260220222605.3468081-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c