]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Prevent reregistration of DM_MR to regular MR
authorAriel Levkovich <lariel@mellanox.com>
Thu, 26 Apr 2018 12:42:54 +0000 (15:42 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 27 Apr 2018 18:22:24 +0000 (14:22 -0400)
commitd10982eff94f2afee7d9429eaaef46b12c706bc7
tree58e78361f5595303d03bcc70d34a11b463535667
parent1e80b2c7d0264fee36ad7fee3bcdc3119067421c
IB/uverbs: Prevent reregistration of DM_MR to regular MR

This patch adds a check in the ib_uverbs_rereg_mr flow to make
sure there's no attempt to rereg a device memory MR to regular MR.
In such case the command will fail with -EINVAL status.

fixes: 6c61edc4904e ("IB/uverbs: Add device memory registration ioctl support")
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