aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorPrzemek Kitszel <[email protected]>2024-09-10 15:57:21 +0200
committerTony Nguyen <[email protected]>2024-09-30 14:23:31 -0700
commitc188afdc36113760873ec78cbc036f6b05f77621 (patch)
treeff6f9cda150e4886cfc89be6dff3f00adeeae6ea /tools/perf/scripts/python/gecko.py
parentd019b1a9128d65956f04679ec2bb8b0800f13358 (diff)
ice: fix memleak in ice_init_tx_topology()
Fix leak of the FW blob (DDP pkg). Make ice_cfg_tx_topo() const-correct, so ice_init_tx_topology() can avoid copying whole FW blob. Copy just the topology section, and only when needed. Reuse the buffer allocated for the read of the current topology. This was found by kmemleak, with the following trace for each PF: [<ffffffff8761044d>] kmemdup_noprof+0x1d/0x50 [<ffffffffc0a0a480>] ice_init_ddp_config+0x100/0x220 [ice] [<ffffffffc0a0da7f>] ice_init_dev+0x6f/0x200 [ice] [<ffffffffc0a0dc49>] ice_init+0x29/0x560 [ice] [<ffffffffc0a10c1d>] ice_probe+0x21d/0x310 [ice] Constify ice_cfg_tx_topo() @buf parameter. This cascades further down to few more functions. Fixes: cc5776fe1832 ("ice: Enable switching default Tx scheduler topology") CC: Larysa Zaremba <[email protected]> CC: Jacob Keller <[email protected]> CC: Pucha Himasekhar Reddy <[email protected]> CC: Mateusz Polchlopek <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions