]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Properly check send and receive CQ pointers
authorLeon Romanovsky <leonro@nvidia.com>
Sun, 9 May 2021 11:39:21 +0000 (14:39 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 10 May 2021 17:06:45 +0000 (14:06 -0300)
commit6001f41f3f711d60c62425014441f2dada015024
tree71328755fc66ccf84bf5f915e35d8d0cb8dd3c51
parent78f0a5f86683713bf30eae653c023ab078a37264
RDMA/siw: Properly check send and receive CQ pointers

The check for the NULL of pointer received from container_of() is
incorrect by definition as it points to some offset from NULL.

Change such check with proper NULL check of SIW QP attributes.

Fixes: 7c742f9fee7e ("rdma/siw: application interface")
Link: https://lore.kernel.org/r/a7535a82925f6f4c1f062abaa294f3ae6e54bdd2.1620560310.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/siw/siw_verbs.c