On Fri, Feb 15, 2019 at 8:43 PM Takashi Iwai tiwai@suse.de wrote:
On Fri, 15 Feb 2019 18:31:08 +0100, Mark Brown wrote:
On Fri, Feb 15, 2019 at 06:21:04PM +0100, Takashi Iwai wrote:
Actually it's not all. As mentioned in my earlier post, there are more of refcount unbalance in the code. Lots of them, really.
Below is a patch I've fixed quickly over the whole scanning the sound tree. Some might be incorrect, so more detailed review for each piece of change is needed...
Extra references aren't such a problem for practical systems since we don't actually ever free any of the DT (there's no mainline way to use overlays yet...), that's how none of this stuff ever gets noticed. I'm not surprised there's loads of missing frees TBH. In contrast if we've got extra frees they will get noticed and cause problems.
Yeah, the rest are just leaks, and we have already tons of them :)
The point is that the commit in question introduced multiple such issues, so they should be addressed as well.
But, the biggest problem is that OF api is very hard to use right...
Hello Mark/Takashi,
Just sent this https://lkml.org/lkml/2019/2/16/52 to fix the problem that was bugging me and to update the patch from Kuninori.
Feel free to send a patch for the rest of the refcount issues :).
Kuninori, if you consider necessary please add your Signed-off-by to the patch as it is mostly your work but I didn't know exactly how to give you credit for it :(.
thanks, Daniel.