mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Umang Jain <umang.jain@ideasonboard.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	kernel-list@raspberrypi.com, Stefan Wahren <wahrenst@gmx.net>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] staging: vchiq_arm: Utilise devm_kzalloc() for allocation
Date: Mon, 14 Oct 2024 09:39:42 +0300	[thread overview]
Message-ID: <43471db1-f34b-4e4c-af58-4fc0f45248bd@stanley.mountain> (raw)
In-Reply-To: <20241014061256.21858-2-umang.jain@ideasonboard.com>

On Mon, Oct 14, 2024 at 11:42:55AM +0530, Umang Jain wrote:
> The struct vchiq_arm_state 'platform_state' is currently allocated
> dynamically using kzalloc(). Unfortunately, it is never freed and is
> subjected to memory leaks in the error handling paths of the probe()
> function.
> 
> To address the issue, use device resource management helper
> devm_kzalloc(), to ensure cleanup after its allocation.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---

Checkpatch warns that:

WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?

(I'm the person who created this checkpatch warning.)  Fixes tags aren't just
for regressions they're for any bug fixes.  So the Fixes tag here should point
to when the driver was introduced.

Even if the Fixes tag points to the first git commit, it's useful information
so, please, always include it.

regards,
dan carpenter


  reply	other threads:[~2024-10-14  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  6:12 [PATCH v2 0/2] staging: vchiq_arm: Two memory leak fixes Umang Jain
2024-10-14  6:12 ` [PATCH v2 1/2] staging: vchiq_arm: Utilise devm_kzalloc() for allocation Umang Jain
2024-10-14  6:39   ` Dan Carpenter [this message]
2024-10-14  6:12 ` [PATCH v2 2/2] staging: vchiq_arm: Utilize " Umang Jain

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=43471db1-f34b-4e4c-af58-4fc0f45248bd@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=umang.jain@ideasonboard.com \
    --cc=wahrenst@gmx.net \
    /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

all inboxes | Powered by JetHome®