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)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 7 Mar 2018 02:57:37 +0000 (19:57 -0700)
commite3fd112cbf21d049faf64ba1471d72b93c22109a
treeed94375da425fce885542808e4761442ebc70c10
parentea0ed47803df93d0904b838d6b5afceec3ad0ba4
RDMA/qedr: Fix kernel panic when running fio over NFSoRDMA

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>
drivers/infiniband/hw/qedr/verbs.c