Public bug reported:

Ib_uverbs failed to create Receive Work Queue indirection table due to unclean 
cmd buffer.
This issue reproduces when the requested table size is 1 wq handler and it's 
fixed in rdma-core v23

The following rdma-core patch fixes this issue:

commit 34225464c1d165f63ffd462364810cc9f374109d        
Author: Mark Bloch <ma...@mellanox.com>                
Date:   Wed Feb 20 20:00:45 2019 +0000                 

    verbs: clear cmd buffer when creating indirection table

    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 <ma...@mellanox.com>
    Signed-off-by: Yishai Hadas <yish...@mellanox.com>

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;

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: libibverbs-dev 22.1-1
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
Date: Mon May  6 10:44:06 2019
ProcEnviron:
 LANGUAGE=en_US:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US
 SHELL=/bin/bash
SourcePackage: rdma-core
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: rdma-core (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug disco

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1827840

Title:
  Failed to create Receive Work Queue indirection table when the number
  of work handler equal 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rdma-core/+bug/1827840/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to