[lustre-devel] [PATCH 534/622] lustre: ptlrpc: ptlrpc_register_bulk LBUG on ENOMEM

James Simmons jsimmons at infradead.org
Thu Feb 27 13:16:42 PST 2020


From: Ann Koehler <amk at cray.com>

Another path through ptl_send_rpc() can cause the assert reported
in LU-10643. The assertion in ptlrpc_register_bulk() on
!desc->bd_registered fails when an rpc is resent and the first
send attempt failed to successfully attach the reply buffer. The
bulk error cleanup in ptl_send_rpc() does not reset the
bd_registered flag.

Cray-bug-id: LUS-7946
WC-bug-id: https://jira.whamcloud.com/browse/LU-12816
Lustre-commit: e6225c07ce4c ("LU-12816 ptlrpc: ptlrpc_register_bulk LBUG on ENOMEM")
Signed-off-by: Ann Koehler <amk at cray.com>
Reviewed-on: https://review.whamcloud.com/36309
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff at cray.com>
Reviewed-by: Chris Horn <hornc at cray.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/ptlrpc/niobuf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/lustre/ptlrpc/niobuf.c b/fs/lustre/ptlrpc/niobuf.c
index 12a9a5e..fcf7bfa 100644
--- a/fs/lustre/ptlrpc/niobuf.c
+++ b/fs/lustre/ptlrpc/niobuf.c
@@ -720,6 +720,8 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 	 * the chance to have long unlink to sluggish net is smaller here.
 	 */
 	ptlrpc_unregister_bulk(request, 0);
+	if (request->rq_bulk)
+		request->rq_bulk->bd_registered = 0;
 out:
 	if (rc == -ENOMEM) {
 		/*
-- 
1.8.3.1



More information about the lustre-devel mailing list