All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: jejb@linux.ibm.com, michael.christie@oracle.com,
	Zhou Guanghui <zhouguanghui1@huawei.com>,
	lduncan@suse.com, cleech@redhat.com
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com
Subject: Re: [PATCH v2] scsi: iscsi: fix possible memory leak when device_register failed
Date: Thu, 17 Nov 2022 13:28:35 -0500	[thread overview]
Message-ID: <166870940541.1572108.9806675424150133794.b4-ty@oracle.com> (raw)
In-Reply-To: <20221110033729.1555-1-zhouguanghui1@huawei.com>

On Thu, 10 Nov 2022 03:37:29 +0000, Zhou Guanghui wrote:

> If device_register() returns error, the name allocated by the
> dev_set_name() need be freed. As described in the comment of
> device_register(), we should use put_device() to give up the
> reference in the error path.
> 
> Fix this by calling put_device(), the name will be freed in the
> kobject_cleanup(), and this patch modified resources will be
> released by calling the corresponding callback function in the
> device_release().
> 
> [...]

Applied to 6.1/scsi-fixes, thanks!

[1/1] scsi: iscsi: fix possible memory leak when device_register failed
      https://git.kernel.org/mkp/scsi/c/f014165faa7b

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2022-11-17 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  3:37 [PATCH v2] scsi: iscsi: fix possible memory leak when device_register failed Zhou Guanghui
2022-11-10 18:11 ` Mike Christie
2022-11-17 18:28 ` Martin K. Petersen [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=166870940541.1572108.9806675424150133794.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=cleech@redhat.com \
    --cc=jejb@linux.ibm.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michael.christie@oracle.com \
    --cc=open-iscsi@googlegroups.com \
    --cc=zhouguanghui1@huawei.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 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.