------- Comment From <email address hidden> 2019-04-18 17:51 EDT------- (In reply to comment #27)
Thanks for the tips Christian, I was able to isolated the fix to commit d38817ea
--- From d38817ea554a9fd140e56414a7c74e7eef444c50 Mon Sep 17 00:00:00 2001 From: Mark Bloch <email address hidden> Date: Wed, 20 Feb 2019 20:00:45 +0000 Subject: [PATCH] verbs: clear cmd buffer when creating indirection table
[ Upstream commit 34225464c1d165f63ffd462364810cc9f374109d ]
Make sure we clear the cmd buffer, not doing so will make the kernel to fail the command.
Fixes: 75c65bbcadcd ("verbs: Consolidate duplicate code in create_rwq_ind_table") Signed-off-by: Mark Bloch <email address hidden> Signed-off-by: Yishai Hadas <email address hidden> Signed-off-by: Nicolas Morey-Chaisemartin <email address hidden> --- libibverbs/cmd.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index 34c71e56..5817c598 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -1854,6 +1854,7 @@ int ibv_cmd_create_rwq_ind_table(struct ibv_context *context, cmd_size = sizeof(*cmd) + num_tbl_entries * sizeof(cmd->wq_handles[0]); cmd_size = (cmd_size + 7) / 8 * 8; cmd = alloca(cmd_size); + memset(cmd, 0, cmd_size);
for (i = 0; i < num_tbl_entries; i++) cmd->wq_handles[i] = init_attr->ind_tbl[i]->handle; -- 2.20.1
This change makes sense based on my debug.
I also applied the change to the head of debian/master branch and verified it works as well.
This should not be a Power specific bug, We just got lucky on x86_64, cmd must have already zeroed.
------- Comment From <email address hidden> 2019-04-18 17:51 EDT-------
(In reply to comment #27)
Thanks for the tips Christian, I was able to isolated the fix to commit d38817ea
--- 140e56414a7c74e 7eef444c50 Mon Sep 17 00:00:00 2001
From d38817ea554a9fd
From: Mark Bloch <email address hidden>
Date: Wed, 20 Feb 2019 20:00:45 +0000
Subject: [PATCH] verbs: clear cmd buffer when creating indirection table
[ Upstream commit 34225464c1d165f 63ffd462364810c c9f374109d ]
Make sure we clear the cmd buffer, not doing so will make the kernel to
fail the command.
Fixes: 75c65bbcadcd ("verbs: Consolidate duplicate code in create_ rwq_ind_ table")
Signed-off-by: Mark Bloch <email address hidden>
Signed-off-by: Yishai Hadas <email address hidden>
Signed-off-by: Nicolas Morey-Chaisemartin <email address hidden>
---
libibverbs/cmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c create_ rwq_ind_ table(struct ibv_context *context, cmd->wq_ handles[ 0]);
index 34c71e56..5817c598 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1854,6 +1854,7 @@ int ibv_cmd_
cmd_size = sizeof(*cmd) + num_tbl_entries * sizeof(
cmd_size = (cmd_size + 7) / 8 * 8;
cmd = alloca(cmd_size);
+ memset(cmd, 0, cmd_size);
for (i = 0; i < num_tbl_entries; i++) >ind_tbl[ i]->handle;
cmd->wq_handles[i] = init_attr-
--
2.20.1
This change makes sense based on my debug.
I also applied the change to the head of debian/master branch and verified it works as well.
This should not be a Power specific bug, We just got lucky on x86_64, cmd must have already zeroed.