OSDN Git Service

RDMA/mlx5: Fix query_srq_cmd() function
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 13 May 2020 10:08:09 +0000 (13:08 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 13 May 2020 19:01:50 +0000 (16:01 -0300)
commit59dde4d19cf8de232c17c79c08e0db67636b022b
treefb3347cd74f3f311cb457bc530f97607afa43317
parentf29de9eee78253d9ae57cd58a6b21eed021742c8
RDMA/mlx5: Fix query_srq_cmd() function

The output buffer used in mlx5_cmd_exec_inout() was wrongly changed from
pre-allocated srq_out pointer to an input "out" point. That leads to
unpredictable results in the get_srqc() call later.

Fixes: 31578defe4eb ("RDMA/mlx5: Update mlx5_ib to use new cmd interface")
Link: https://lore.kernel.org/r/20200513100809.246315-1-leon@kernel.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/srq_cmd.c