| #
47f05f71 |
| 22-Aug-2026 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'firewire-updates-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire updates from Takashi Sakamoto: "Error handling, a potential bug fix, and KUnit tes
Merge tag 'firewire-updates-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire updates from Takashi Sakamoto: "Error handling, a potential bug fix, and KUnit tests:
- Handle failures when generating the contents of the configuration ROM with parameters supplied by in-kernel implementations such as unit drivers (Sreeraj S Kurup)
- Fix potential memory leak when an invalid self-ID sequence causes an error while building the internal node tree (Abdun Nihaal)
KUnit tests have been added to trigger this case"
* tag 'firewire-updates-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: fix memory leak in error path of build_tree() firewire: core: validate parent port count before allocating nodes in build_tree() firewire: core: consolidate port counting in build_tree() firewire: core: add KUnit tests for failure of tree building firewire: core: add KUnit tests for successful tree building firewire: core: add KUnit test skeleton for node tree firewire: core: validate sub-block lengths in fw_core_add_descriptor() firewire: core: validate overall descriptor length in fw_core_add_descriptor()
show more ...
|
|
Revision tags: v7.2 |
|
| #
05bfb132 |
| 11-Aug-2026 |
Takashi Sakamoto <o-takashi@sakamocchi.jp> |
firewire: core: fix memory leak in error path of build_tree()
In the error path of build_tree(), node instances can remain in the local linked list when the function returns.
Whenever an invalid va
firewire: core: fix memory leak in error path of build_tree()
In the error path of build_tree(), node instances can remain in the local linked list when the function returns.
Whenever an invalid value is detected in the self ID sequence, each allocated node instance is either an entry in the linked list or an entry in the ports array of its parent node. Therefore, the allocate node instances can be safely released by traversing the linked list from its head.
Release the remaining node instances with for_each_fw_node() before returning to the caller.
Fixes: 3038e353cfaf ("firewire: Add core firewire stack.") Reported-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Link: https://lore.kernel.org/all/20260727095955.104972-1-nihaal@cse.iitm.ac.in/ Link: https://lore.kernel.org/r/20260811120928.700577-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
show more ...
|
| #
f7440227 |
| 10-Aug-2026 |
Takashi Sakamoto <o-takashi@sakamocchi.jp> |
firewire: core: add KUnit tests for failure of tree building
Abdun Nihaal has reported a memory leak when tree building fails in the middle of self ID sequence enumeration. This is caused by an inva
firewire: core: add KUnit tests for failure of tree building
Abdun Nihaal has reported a memory leak when tree building fails in the middle of self ID sequence enumeration. This is caused by an invalid self ID sequence and is not a common occurrence.
This commit is intended to assist in fixing the issue by adding KUnit tests to show the cases in which the memory leak is triggered. The leak occurs internally in the build_tree() function, therefore it cannot be detected directly by the tests.
Link: https://lore.kernel.org/r/20260810064119.410324-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
show more ...
|
| #
7b763ea1 |
| 10-Aug-2026 |
Takashi Sakamoto <o-takashi@sakamocchi.jp> |
firewire: core: add KUnit tests for successful tree building
After a bus reset, self ID sequence is captured by 1394 OHCI hardware and passed to software through SelfID DMA context. The core parses
firewire: core: add KUnit tests for successful tree building
After a bus reset, self ID sequence is captured by 1394 OHCI hardware and passed to software through SelfID DMA context. The core parses the sequence to build an internal cache of the node tree for the current generation of the bus. This is the first step in managing resources on the bus.
The tree is build by the build_tree() function. This commit adds KUnit tests for the function, covering several successful scenarios.
Link: https://lore.kernel.org/r/20260810064119.410324-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
show more ...
|
| #
1f9b65cf |
| 10-Aug-2026 |
Takashi Sakamoto <o-takashi@sakamocchi.jp> |
firewire: core: add KUnit test skeleton for node tree
Some issues have been reported in node tree management. Refactoring the topology-related code in the core is required. Adding unit tests would h
firewire: core: add KUnit test skeleton for node tree
Some issues have been reported in node tree management. Refactoring the topology-related code in the core is required. Adding unit tests would help ensure that the refactoring does not introduce regressions.
This commit adds a KUnit test skeleton for this purpose.
Link: https://lore.kernel.org/r/20260810064119.410324-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
show more ...
|