]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Fix kernel crash during MR deregistration flow
authorAriel Levkovich <lariel@mellanox.com>
Thu, 26 Apr 2018 12:42:55 +0000 (15:42 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 27 Apr 2018 18:22:24 +0000 (14:22 -0400)
commit5780fde0f04f47069af57738dd8af16b9625d8e4
treecd93d7d18b8f87d780b14cd888894e87ac24229c
parentd10982eff94f2afee7d9429eaaef46b12c706bc7
IB/uverbs: Fix kernel crash during MR deregistration flow

This patch fixes a crash that happens due to access to an
uninitialized DM pointer within the MR object.

The change makes sure the DM pointer in the MR object is set to
NULL during a non-DM MR creation to prevent a false indication
that this MR is related to a DM in the dereg flow.

Fixes: 6c61edc4904e ("IB/uverbs: Add device memory registration ioctl support")
Reported-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c