All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ma Ke <make_ruc2021@163.com>
Cc: bvanassche@acm.org, jgg@ziepe.ca, leon@kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] RDMA/srp: Fix error handling in srp_add_port
Date: Tue, 17 Dec 2024 09:04:34 +0100	[thread overview]
Message-ID: <2024121717-trustful-opulently-c386@gregkh> (raw)
In-Reply-To: <20241217075538.2909996-1-make_ruc2021@163.com>

On Tue, Dec 17, 2024 at 03:55:38PM +0800, Ma Ke wrote:
> The reference count of the device incremented in device_initialize() is
> not decremented when device_add() fails. Add a put_device() call before
> returning from the function to decrement reference count for cleanup.
> Or it could cause memory leak.

That is not what you did here.  Please be more careful when sending out
"bugfixes" like this.

thanks,

greg k-h

  reply	other threads:[~2024-12-17  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  7:55 [PATCH] RDMA/srp: Fix error handling in srp_add_port Ma Ke
2024-12-17  8:04 ` Greg KH [this message]
2024-12-19 11:52 ` Leon Romanovsky
2024-12-19 11:54 ` Leon Romanovsky

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=2024121717-trustful-opulently-c386@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=bvanassche@acm.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=make_ruc2021@163.com \
    --cc=stable@vger.kernel.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 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.