]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: Reoder rxq_idx check in __net_mp_open_rxq()
authorYue Haibing <yuehaibing@huawei.com>
Tue, 24 Jun 2025 14:01:59 +0000 (22:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jun 2025 23:53:51 +0000 (16:53 -0700)
commitf6fa45d67e0546c114063c8b0acff48a0924738d
tree93c32eee787018c21180cdbfc3e6fdf523509af3
parent3b3ccf9ed05e0650273e7086f4d8f495e4b2c850
net: Reoder rxq_idx check in __net_mp_open_rxq()

array_index_nospec() clamp the rxq_idx within the range of
[0, dev->real_num_rx_queues), move the check before it.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250624140159.3929503-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/netdev_rx_queue.c