summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorZhu Ling <zhuling0805@qq.com>2026-09-04 17:07:46 +0800
committerUlf Hansson <ulfh@kernel.org>2026-09-10 14:20:54 +0200
commit08b54e16d547d5c1aa61bf7a3595bb1620975eeb (patch)
treebbbe44b6f92069236c842c3ae4886fcfb289bcc1 /tools/perf/scripts/python/bin/stackcollapse-record
parent9c182bc5d7817437a7d04ab96133f9191846d93d (diff)
downloadlinux-next-08b54e16d547d5c1aa61bf7a3595bb1620975eeb.tar.gz
linux-next-08b54e16d547d5c1aa61bf7a3595bb1620975eeb.zip
mmc: core: Fix OF node reference leak on card add failure
mmc_of_find_child_device() returns a device node with its reference count incremented. mmc_add_card() stores the reference before calling device_add(), while the card is marked present only after device_add() succeeds. If device_add() fails, the callers release the card through mmc_remove_card(). However, mmc_remove_card() only drops the OF node reference for a present card, leaking the reference on this error path. Move of_node_put() outside the present-card conditional so the reference is released for both registered cards and card-add failures. Fixes: 25185f3f31c9 ("mmc: Add SDIO function devicetree subnode parsing") Cc: stable@vger.kernel.org Signed-off-by: Zhu Ling <zhuling0805@qq.com> Reviewed-by: Shawn Lin <shawn.lin@linux.dev> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions