summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMyeonghun Pak <mhun512@gmail.com>2026-09-17 14:33:36 -0400
committerPaolo Abeni <pabeni@redhat.com>2026-09-22 11:15:00 +0200
commita92e1a412c53dc0d9ad639e7abf8b3fc70a5b6ad (patch)
tree1d7bc41d45a07260fba30cc26ce8cc34342d812b /tools/perf/scripts/python/stackcollapse.py
parent177a59665d8a71c663a8f82a5d7f2ff9a8a2ac2e (diff)
downloadlinux-a92e1a412c53dc0d9ad639e7abf8b3fc70a5b6ad.tar.gz
linux-a92e1a412c53dc0d9ad639e7abf8b3fc70a5b6ad.zip
tg3: clean up PHYLIB resources on probe failure
tg3_get_invariants() can register an MDIO bus and connect a PHY for USE_PHYLIB devices. If tg3_init_one() later fails, its common error path releases the mappings and netdev without undoing those PHYLIB resources. Disconnect the PHY and unregister the MDIO bus before the remaining teardown. Guard PHY cleanup with USE_PHYLIB to match tg3_phy_init(), and call tg3_mdio_fini() unconditionally to match tg3_mdio_init(). The existing IS_CONNECTED and MDIOBUS_INITED flags make both helpers safe when initialization only completed partially. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 158d7abdae85 ("tg3: Add mdio bus registration") Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260917183336.36239-1-mhun512@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions