summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@nvidia.com>2023-05-04 20:16:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 14:01:48 +0200
commite25e404effcf6712e1e9e758e94c57c025a7c877 (patch)
treef9a73513b86c06a036c0e206e7341f87216e671a /tools
parent253a3a324e0ebc2825de76a0f5f17b8383b2023d (diff)
downloadlinux-stable-e25e404effcf6712e1e9e758e94c57c025a7c877.tar.gz
linux-stable-e25e404effcf6712e1e9e758e94c57c025a7c877.tar.bz2
linux-stable-e25e404effcf6712e1e9e758e94c57c025a7c877.zip
net/sched: flower: fix error handler on replace
[ Upstream commit fd741f0d9f702c193b2b44225c004f8c5d5be163 ] When replacing a filter (i.e. 'fold' pointer is not NULL) the insertion of new filter to idr is postponed until later in code since handle is already provided by the user. However, the error handling code in fl_change() always assumes that the new filter had been inserted into idr. If error handler is reached when replacing existing filter it may remove it from idr therefore making it unreachable for delete or dump afterwards. Fix the issue by verifying that 'fold' argument wasn't provided by caller before calling idr_remove(). Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Signed-off-by: Vlad Buslov <vladbu@nvidia.com> Reviewed-by: Pedro Tammela <pctammela@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions