mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: WenTao Liang <vulab@iscas.ac.cn>
To: o-takashi@sakamocchi.jp
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, WenTao Liang <vulab@iscas.ac.cn>,
	stable@vger.kernel.org
Subject: [PATCH] fix: firewire: report_lost_node: unconditional fw_node_put after   conditional fw_node_event causes excess put
Date: Fri, 26 Jun 2026 20:37:43 +0800	[thread overview]
Message-ID: <20260626123743.36388-1-vulab@iscas.ac.cn> (raw)

report_lost_node unconditionally calls fw_node_put after fw_node_event,
  but fw_node_event does not unconditionally acquire a reference. Since
  for_each_fw_node already holds a reference on the node during traversal,
  the extra fw_node_put over-decrements the refcount. The sibling callback
  report_found_node does not call fw_node_put, confirming the extra put is
  erroneous.

Cc: stable@vger.kernel.org
Fixes: 3038e353cfaf ("firewire: Add core firewire stack.")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
---
 drivers/firewire/core-topology.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index bb2d2db30795..49820e4a34ff 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -298,7 +298,6 @@ static void report_lost_node(struct fw_card *card,
 			     struct fw_node *node, struct fw_node *parent)
 {
 	fw_node_event(card, node, FW_NODE_DESTROYED);
-	fw_node_put(node);
 
 	/* Topology has changed - reset bus manager retry counter */
 	card->bm_retries = 0;
-- 
2.39.5 (Apple Git-154)


             reply	other threads:[~2026-06-26 12:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 12:37 WenTao Liang [this message]
2026-06-27 13:46 ` Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260626123743.36388-1-vulab@iscas.ac.cn \
    --to=vulab@iscas.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=o-takashi@sakamocchi.jp \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®