public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] firewire: core: separate iso_resource paths
@ 2026-04-29  9:34 Takashi Sakamoto
  2026-04-29  9:34 ` [PATCH 1/7] firewire: core: code refactoring for early return at client resource allocation Takashi Sakamoto
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Takashi Sakamoto @ 2026-04-29  9:34 UTC (permalink / raw)
  To: linux1394-devel; +Cc: shuangpeng.kernel, dingiso.kernel, linux-kernel

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(-)


base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-30 13:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  9:34 [PATCH 0/7] firewire: core: separate iso_resource paths Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 1/7] firewire: core: code refactoring for early return at client resource allocation Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 2/7] firewire: core: code refactoring to queue work item for iso_resource Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 3/7] firewire: core: code refactoring for helper function to fill iso_resource parameters Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 4/7] firewire: core: split functions for iso_resource once operation Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 5/7] firewire: core: code cleanup to remove old implementations for " Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 6/7] firewire: core: append _auto suffix for non-once iso resource operations Takashi Sakamoto
2026-04-29  9:34 ` [PATCH 7/7] firewire: core: code cleanup for iso resource auto creation Takashi Sakamoto
2026-04-30 13:05 ` [PATCH 0/7] firewire: core: separate iso_resource paths Takashi Sakamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox