mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Hannes Reinecke <hare@suse.de>,
	linux-kernel@vger.kernel.org, Miaoqian Lin <linmq006@gmail.com>,
	linux-block@vger.kernel.org,
	Damien Le Moal <damien.lemoal@wdc.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] block: fix memory leak in disk_register_independent_access_ranges
Date: Fri, 21 Jan 2022 10:48:02 -0700	[thread overview]
Message-ID: <164278728249.232198.7158002983506256334.b4-ty@kernel.dk> (raw)
In-Reply-To: <20220120101025.22411-1-linmq006@gmail.com>

On Thu, 20 Jan 2022 10:10:25 +0000, Miaoqian Lin wrote:
> kobject_init_and_add() takes reference even when it fails.
> According to the doc of kobject_init_and_add()
> 
>    If this function returns an error, kobject_put() must be called to
>    properly clean up the memory associated with the object.
> 
> Fix this issue by adding kobject_put().
> Callback function blk_ia_ranges_sysfs_release() in kobject_put()
> can handle the pointer "iars" properly.
> 
> [...]

Applied, thanks!

[1/1] block: fix memory leak in disk_register_independent_access_ranges
      commit: c321e650a45c4228cce1107680ac74e06f014906

Best regards,
-- 
Jens Axboe



      parent reply	other threads:[~2022-01-21 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 10:10 Miaoqian Lin
2022-01-21  9:57 ` Damien Le Moal
2022-01-21 17:48 ` Jens Axboe [this message]

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=164278728249.232198.7158002983506256334.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=hare@suse.de \
    --cc=kbusch@kernel.org \
    --cc=linmq006@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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®