diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-11-18 14:38:03 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-20 11:07:57 -0800 |
commit | 76483980174c6ff80cc4d02a444f2815073d203d (patch) | |
tree | abcdce5aa1151a6275d78f0c1b2eca647ba0827a /tools/perf/scripts/python/stackcollapse.py | |
parent | dd6028a3cb5da85d6c8ff20a593a7a70d10d650c (diff) |
octeontx2-af: Fix access of iter->entry after iter object has been kfree'd
The call to pc_delete_flow can kfree the iter object, so the following
dev_err message that accesses iter->entry can accessmemory that has
just been kfree'd. Fix this by adding a temporary variable 'entry'
that has a copy of iter->entry and also use this when indexing into
the array mcam->entry2target_pffunc[]. Also print the unsigned value
using the %u format specifier rather than %d.
Addresses-Coverity: ("Read from pointer after free")
Fixes: 55307fcb9258 ("octeontx2-af: Add mbox messages to install and delete MCAM rules")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201118143803.463297-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions