mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com
Cc: draviv@codeaurora.org, sthumma@codeaurora.org,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	bjorn.andersson@linaro.org
Subject: Re: [PATCH] scsi: ufs: ufshcd-pltfrm: fix memory leak due to probe defer
Date: Wed, 20 Oct 2021 09:20:38 -0700	[thread overview]
Message-ID: <22209a52-c113-270f-3102-bdf95910f841@acm.org> (raw)
In-Reply-To: <20210914092214.6468-1-srinivas.kandagatla@linaro.org>

On 9/14/21 2:22 AM, Srinivas Kandagatla wrote:
> UFS drivers that probe defer will endup leaking memory allocated for
> clk and regulator names via kstrdup because the structure that is
> holding this memory is allocated via devm_* variants which will be
> freed during probe defer but the names are never freed.
> 
> Use same devm_* variant of kstrdup to free the memory allocated to
> name when driver probe defers.
> 
> Kmemleak found around 11 leaks on Qualcomm Dragon Board RB5:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  parent reply	other threads:[~2021-10-20 16:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  9:22 Srinivas Kandagatla
2021-10-20 15:47 ` Srinivas Kandagatla
2021-10-21  3:14   ` Martin K. Petersen
2021-10-20 16:20 ` Bart Van Assche [this message]
2021-10-27  4:00 ` Martin K. Petersen

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=22209a52-c113-270f-3102-bdf95910f841@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=draviv@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=sthumma@codeaurora.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

all inboxes | Powered by JetHome®