[PATCH 4.18 31/53] RDMA/uverbs: Fix validity check for modify QP