Re: [PATCH v4] net: ethernet: renesas: rswitch: fix device_node refcount leak in rswitch_get_port_node()
Andrew Lunn <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 24, 2026 at 10:15:15AM +0200, Markus Elfring wrote: > … > > Rework the function around for_each_available_child_of_node_scoped() > > instead of adding a manual of_node_put(), so the iterator's reference > > is dropped automatically on every exit path. Since port is the > > function's return value, take an explicit reference with of_node_get() > > on the match before breaking out of the loop. > > How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? > > See also: > * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145 > * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34 Hi Markus The stable rules include the statement, the bug being fixed must bother somebody. Do you know of somebody bothered by the reference leak? Andrew