From: Bart Van Assche <bvanassche@acm.org>
To: Ma Ke <make_ruc2021@163.com>, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/srp: Fix error handling in srp_add_port
Date: Tue, 17 Dec 2024 08:14:13 -0800 [thread overview]
Message-ID: <2f74036c-7942-4e8b-8c71-6c413d722262@acm.org> (raw)
In-Reply-To: <20241217104605.2924666-1-make_ruc2021@163.com>
On 12/17/24 2:46 AM, Ma Ke wrote:
> Once device_add() failed, we should call only put_device() to
> decrement reference count for cleanup. We should not call device_del()
> before put_device().
>
> As comment of device_add() says, 'if device_add() succeeds, you should
> call device_del() when you want to get rid of it. If device_add() has
> not succeeded, use only put_device() to drop the reference count'.
>
> Found by code review.
> Cc: stable@vger.kernel.org
> Fixes: c8e4c2397655 ("RDMA/srp: Rework the srp_add_port() error path")
> Signed-off-by: Ma Ke <make_ruc2021@163.com>
Patch descriptions should be in the imperative mood.
A blank line should separate the description and the tags.
Otherwise this patch looks good to me. Hence:
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2024-12-17 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 10:46 Ma Ke
2024-12-17 16:14 ` Bart Van Assche [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=2f74036c-7942-4e8b-8c71-6c413d722262@acm.org \
--to=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 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®