RDMA/qedr: Fix kernel panic when running fio over NFSoRDMA
authorKalderon, Michal <Michal.Kalderon@cavium.com>
Mon, 5 Mar 2018 08:50:10 +0000 (10:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:35 +0000 (07:50 +0200)
commit7c5f3d1013eaf42cf20d197884364a7f62f59bdf
tree598997ba3c3d9e6eeb3396254d9ddfb392eb34c4
parentb79a8597b0121263a839be1ebec873e32bd169ed
RDMA/qedr: Fix kernel panic when running fio over NFSoRDMA

[ Upstream commit e3fd112cbf21d049faf64ba1471d72b93c22109a ]

Race in qedr_poll_cq, lastest_cqe wasn't protected by lock,
leading to a case where two context's accessing poll_cq at
the same time lead to one of them having a pointer to an old
latest_cqe and reading an invalid cqe element

Signed-off-by: Amit Radzi <Amit.Radzi@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/qedr/verbs.c