dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ma Ke <make24@iscas.ac.cn>, peter.ujfalusi@gmail.com, vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND] dmaengine: ti-dma-crossbar: Fix error handling in ti_am335x_xbar_route_allocate
Date: Mon, 15 Dec 2025 12:52:31 +0100	[thread overview]
Message-ID: <c0cc4abd-4000-4487-9837-e55c442c4d0d@kernel.org> (raw)
In-Reply-To: <20251215014249.11495-1-make24@iscas.ac.cn>

On 15/12/2025 02:42, Ma Ke wrote:
> ti_am335x_xbar_route_allocate() calls of_find_device_by_node() which
> increments the reference count of the platform device, but fails to
> call put_device() to decrement the reference count before returning.
> This could cause a reference count leak each time the function is
> called, preventing the platform device from being properly cleaned up
> and leading to memory leakage.
> 
> Add proper put_device() calls in all exit paths to fix the reference
> count imbalance.
> 
> Found by code review.
> 
> Cc: stable@vger.kernel.org
> Fixes: 42dbdcc6bf96 ("dmaengine: ti-dma-crossbar: Add support for crossbar on AM33xx/AM43xx")
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
> ---
>  drivers/dma/ti/dma-crossbar.c | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 


Just a note, author sends and resends same patches without addressing
feedback. At least one case was very dubious or just incorrect code, and
author just ignored it and sent it again to hide the previous
discussion, so I suspect LLM generated content.

I did not review the code here, but please carefully review all patches
from this author before applying and simply do not trust that this looks
like a fix.

Best regards,
Krzysztof

  reply	other threads:[~2025-12-15 11:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15  1:42 [PATCH RESEND] dmaengine: ti-dma-crossbar: Fix error handling in ti_am335x_xbar_route_allocate Ma Ke
2025-12-15 11:52 ` Krzysztof Kozlowski [this message]
2025-12-16 12:16   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0cc4abd-4000-4487-9837-e55c442c4d0d@kernel.org \
    --to=krzk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=peter.ujfalusi@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).