]> git.ipfire.org Git - thirdparty/linux.git/commit
ethtool: rss: fix indir_table and hkey leak on get_rxfh failure
authorJakub Kicinski <kuba@kernel.org>
Fri, 22 May 2026 23:06:45 +0000 (16:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 May 2026 15:17:56 +0000 (08:17 -0700)
commit266297692f97008ca48bc311775c087c59bd7fe3
tree6919ef3fecbb939739e7ff93a393b08662c427a0
parent8d60141a32875248ef71d49c9920fa5e2aa40b29
ethtool: rss: fix indir_table and hkey leak on get_rxfh failure

rss_prepare_get() allocates the indirection table and hash key buffer
via rss_get_data_alloc(), then calls ops->get_rxfh() to populate them.
If get_rxfh() fails, the function returns an error without freeing
the allocation.

Fixes: 4f038a6a02d2 ("net: ethtool: Don't call .cleanup_data when prepare_data fails")
Link: https://patch.msgid.link/20260522230647.1705600-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/rss.c