[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f74036c-7942-4e8b-8c71-6c413d722262@acm.org>
Date: Tue, 17 Dec 2024 08:14:13 -0800
From: Bart Van Assche <bvanassche@....org>
To: Ma Ke <make_ruc2021@....com>, jgg@...pe.ca, leon@...nel.org
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] RDMA/srp: Fix error handling in srp_add_port
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@...r.kernel.org
> Fixes: c8e4c2397655 ("RDMA/srp: Rework the srp_add_port() error path")
> Signed-off-by: Ma Ke <make_ruc2021@....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@....org>
Powered by blists - more mailing lists