From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 329502D7DF8 for ; Thu, 30 Apr 2026 13:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777554339; cv=none; b=K/bT6926/NUeIyGc1G4h3/TROZRhlmUEefB57DLGarsFk28eVSKazOmqX4hKe8uLYk4Y8M7x/dWeWIrybKDpZOyhtb2PeWn9+mHMqsxdc2D3uiuZzCkekId7+DNYhSm3BrTBFYsUWUjwJEf0Zwzz1qV2+mWJBMwUakl8oh4451c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777554339; c=relaxed/simple; bh=eTbyG7z+wQee3d7GBduJjvDBGdnM180xUTdPiLlKcmk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hXaQd/ur5eSbIE1qsqIzCTUaWkWfniB6Cx1sZDUf7cZcYZe7o+3r4EFZixKWiOnmnndIhy5U0uxFU9CyCCBOFmHrZx6Neg0NP5Wpg7SSCNDeQfantOAj8Batz+iwGXUbEbQqnXaC74KFKpgb5vFe7lTR0OaWTzeHHAkCaZCdDog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=0ZvDutzO; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gArMRAXh; arc=none smtp.client-ip=202.12.124.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="0ZvDutzO"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gArMRAXh" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 542271D0009E; Thu, 30 Apr 2026 09:05:35 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 30 Apr 2026 09:05:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1777554335; x= 1777640735; bh=qnZOVwdaHf6Hq2E9WA3COz1vUi3c6hywsKGXVIomORM=; b=0 ZvDutzOQd7NHP8yBGqqVyvMcIlCwYFd/9x7mVAuDPcdz7GmxBqu4PtDteiTEUTAc eAB6fJ7HHCDGgaq3h210SYeVJMxpd2w8rTHcGTfOl35BpPnBLHlUlqN+Wq429k+m dg7oDZgbrn4sBDcLE4NKOBZcrKdksdjD+jsPVyUejoKD+9O/JlaWk0GpCdPUiR4o 5yGgohqEG2wa+gWoiskoK67Y81E44hJjN8hYb8s9K1v+mw0FSgHSfzma/nuCcoSe HaJw9UrDHKdUAUYQYWgMazMG/GSts48+tNkNS+MbTsTA/7KlhY/zEtwY78+gIbqC lSAAPVTKPQZE/l1ok9z/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1777554335; x=1777640735; bh=qnZOVwdaHf6Hq2E9WA3COz1vUi3c6hywsKG XVIomORM=; b=gArMRAXhpKgiy+N/OpIHUn/mW3QkakBHoXSPruQOrcNP/FbynBq AqouX3fUjpcRJ/ZTJ/AzNK6NirQ9+Fdp+Suwk2QnX3tGWHDYBvf1DbvxMZ/6rdLz Vy2oLmq++Z+/7l+5ug6SEE8iHz+dliMZjEMEoB/poJEsjzILY+HDG/9j9PAECeER F21h6nmjKgCLkuPzy2HJ86Rd9y7QdBe6IjO9wjl8vdW3nvCqskdvNCDvX3MxU7ZK g5xO6J5QIAaPjrnN5r/ZleoM6jmJ8kGGqQPRxv0c27NBDKm/BxNiAwbcvTJG9KiY L1QMhxLLc+mL+DvMQX7MZeIHhE63havsG0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdekjeeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefvrghkrghshhhi ucfurghkrghmohhtohcuoehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjhhpqe enucggtffrrghtthgvrhhnpeejhffhgeeutefhfeeugfeggeduhfekffduhffhheekhfdt veefhfejjefftdfgjeenucffohhmrghinhepshhouhhrtggvfhhorhhgvgdrnhgvthenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhppdhnsggprhgtphhtthhopeegpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopehlihhnuhigudefleegqdguvghvvghlsehlihhs thhsrdhsohhurhgtvghfohhrghgvrdhnvghtpdhrtghpthhtohepughinhhgihhsohdrkh gvrhhnvghlsehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghl sehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhhuhgrnhhgphgvnhhgrd hkvghrnhgvlhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Apr 2026 09:05:33 -0400 (EDT) Date: Thu, 30 Apr 2026 22:05:30 +0900 From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: dingiso.kernel@gmail.com, linux-kernel@vger.kernel.org, shuangpeng.kernel@gmail.com Subject: Re: [PATCH 0/7] firewire: core: separate iso_resource paths Message-ID: <20260430130530.GA209193@sakamocchi.jp> Mail-Followup-To: linux1394-devel@lists.sourceforge.net, dingiso.kernel@gmail.com, linux-kernel@vger.kernel.org, shuangpeng.kernel@gmail.com References: <20260429093449.160545-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260429093449.160545-1-o-takashi@sakamocchi.jp> On Wed, Apr 29, 2026 at 06:34:41PM +0900, Takashi Sakamoto wrote: > Hi, > > (Repost since lkml was excluded.) > > Dingisoul has reported that a case where the reference count of a > client structure is leaked when handling iso_resource in cdev layer[1]. > Fixing the bug immediately s difficult due to the complexity of > per-client resource lifetime. > > As a first step toward addressing this issue, this patchset refactors the > existing code for isochronous resource operation. Userspace application > can allocate and deallocate isochronous resources on IEEE 1394 bus in two > ways: > * FW_CDEV_IOC_[DE]ALLOCATE_ISO_RESOURCE > * FW_CDEV_IOC_[DE]ALLOCATE_ISO_RESOURCE_ONCE > > With the former, the application delegates the maintenance of the > allocated isochronous resources to kernel and obtain a handle for the > client resource. With the latter, the application should maintain > isochronous resources every time receiving bus reset event, without > relying on a handle. > > Currently, both operations are handled by the same code, although they > differ in terms of client resource management. > > This patchset separates these two paths. As a result, it becomes clear > that the reported issue only affects client resource allocated via the > former method. While the actual bug fix is deferred, this refactoring > lays the groundwork for it. > > [1] https://sourceforge.net/p/linux1394/mailman/linux1394-devel/thread/20260404110936.GA282614%40sakamocchi.jp/#msg59317811 > > Takashi Sakamoto (7): > firewire: core: code refactoring for early return at client resource > allocation > firewire: core: code refactoring to queue work item for iso_resource > firewire: core: code refactoring for helper function to fill > iso_resource parameters > firewire: core: split functions for iso_resource once operation > firewire: core: code cleanup to remove old implementations for once > operation > firewire: core: append _auto suffix for non-once iso resource > operations > firewire: core: code cleanup for iso resource auto creation > > drivers/firewire/core-cdev.c | 285 +++++++++++++++++++++-------------- > 1 file changed, 176 insertions(+), 109 deletions(-) Applied to for-next branch. Regards Takashi Sakamoto