All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: ceph-devel@vger.kernel.org,
	Yang Yingliang <yangyingliang@huawei.com>,
	linux-block@vger.kernel.org
Cc: yehuda@hq.newdream.net, idryomov@gmail.com, dongsheng.yang@easystack.cn
Subject: Re: [PATCH] rbd: fix possible memory leak in rbd_sysfs_init()
Date: Thu, 27 Oct 2022 07:15:52 -0600	[thread overview]
Message-ID: <166687655254.10763.17976246542549193136.b4-ty@kernel.dk> (raw)
In-Reply-To: <20221027091918.2294132-1-yangyingliang@huawei.com>

On Thu, 27 Oct 2022 17:19:18 +0800, Yang Yingliang wrote:
> If device_register() returns error in rbd_sysfs_init(), name of kobject
> which is allocated in dev_set_name() called in device_add() is leaked.
> 
> As comment of device_add() says, it should call put_device() to drop
> the reference count that was set in device_initialize() when it fails,
> so the name can be freed in kobject_cleanup().
> 
> [...]

Applied, thanks!

[1/1] rbd: fix possible memory leak in rbd_sysfs_init()
      (no commit info)

Best regards,
-- 
Jens Axboe



      parent reply	other threads:[~2022-10-27 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  9:19 [PATCH] rbd: fix possible memory leak in rbd_sysfs_init() Yang Yingliang
2022-10-27 12:12 ` Alex Elder
2022-10-27 13:15 ` 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=166687655254.10763.17976246542549193136.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dongsheng.yang@easystack.cn \
    --cc=idryomov@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    --cc=yehuda@hq.newdream.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.