diff options
| author | 2026-05-22 16:06:46 -0700 | |
|---|---|---|
| committer | 2026-05-26 08:17:57 -0700 | |
| commit | 78ccf1a70c6378e1f5073a8c2209b5129067b925 (patch) | |
| tree | 8b333342a3ad02b84dfe789b11d95ab6a7507289 /include/linux/bcma/ssh:/git@git.zx2c4.com | |
| parent | ethtool: rss: fix indir_table and hkey leak on get_rxfh failure (diff) | |
ethtool: rss: fix hkey leak when indir_size is 0
rss_get_data_alloc() allocates a single buffer that backs both the
indirection table and the hash key, but only assigned data->indir_table
when indir_size was nonzero. The expectation was that no driver
implements RSS without supporting indirection table but apparently
enic does just that (it's the only such in-tree driver).
enic has get_rxfh_key_size but no get_rxfh_indir_size.
data->indir_table stays as NULL, hkey gets set but rss_get_data_free()
kfree(data->indir_table) is a nop and the allocation leaks.
Always store the allocation base in data->indir_table so the free path
is unambiguous. No caller treats indir_table as a sentinel; everything
keys off indir_size.
Fixes: 7112a04664bf ("ethtool: add netlink based get rss support")
Link: https://patch.msgid.link/20260522230647.1705600-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/bcma/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
