]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hv_netvsc: reject RSS hash key programming without RX indirection table
authorAditya Garg <gargaditya@linux.microsoft.com>
Mon, 12 Jan 2026 10:01:33 +0000 (02:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:39 +0000 (11:18 +0100)
commit4cd55c609e85ae2313248ef1a33619a3eef44a16
tree65018db00fe9920df3fe7b3a88793deb68f9bdfb
parent29a3c30b911f077980bb1599123b76ab6f04750b
net: hv_netvsc: reject RSS hash key programming without RX indirection table

[ Upstream commit d23564955811da493f34412d7de60fa268c8cb50 ]

RSS configuration requires a valid RX indirection table. When the device
reports a single receive queue, rndis_filter_device_add() does not
allocate an indirection table, accepting RSS hash key updates in this
state leads to a hang.

Fix this by gating netvsc_set_rxfh() on ndc->rx_table_sz and return
-EOPNOTSUPP when the table is absent. This aligns set_rxfh with the device
capabilities and prevents incorrect behavior.

Fixes: 962f3fee83a4 ("netvsc: add ethtool ops to get/set RSS key")
Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com>
Reviewed-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/1768212093-1594-1-git-send-email-gargaditya@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/hyperv/netvsc_drv.c