]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
svcrdma: Unregister the device if svc_rdma_accept() fails
authorChuck Lever <chuck.lever@oracle.com>
Sun, 27 Apr 2025 16:39:59 +0000 (12:39 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:16 +0000 (11:11 +0100)
commitcb3cba0ec372fa7c5f5f5c12990bef02e458ab86
tree6afd5af0280d9b42e2b02e9a54b9996969e118db
parentf78b38af3540b4875147b7b884ee11a27b3dbf4c
svcrdma: Unregister the device if svc_rdma_accept() fails

commit 8ac6fcae5dc0e801f1c82a83f5ae2c0a4db19932 upstream.

To handle device removal, svc_rdma_accept() requests removal
notification for the underlying device when accepting a connection.
However svc_rdma_free() is not invoked if svc_rdma_accept() fails.
There needs to be a matching "unregister" in that case; otherwise
the device cannot be removed.

Fixes: c4de97f7c454 ("svcrdma: Handle device removal outside of the CM event handler")
Cc: stable@vger.kernel.org
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtrdma/svc_rdma_transport.c