]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Fix command checking as part of ib_uverbs_ex_modify_qp()
authorMoni Shoua <monis@mellanox.com>
Sun, 24 Dec 2017 11:54:57 +0000 (13:54 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 27 Dec 2017 22:24:41 +0000 (15:24 -0700)
commit2678d8a9d26afa84a552c61cb30e224ae842440f
tree7cd4b645a1b00b58a511d86738019bf109aaf960
parent60ecc7d335c4a99a6b0fd26d3670a6b0e41afe53
IB/uverbs: Fix command checking as part of ib_uverbs_ex_modify_qp()

If the input command length is larger than the kernel supports an error should
be returned in case the unsupported bytes are not cleared, instead of the
other way aroudn. This matches what all other callers of ib_is_udata_cleared
do and will avoid user ABI problems in the future.

Cc: <stable@vger.kernel.org> # v4.10
Fixes: 354cb00d11fc ("IB/uverbs: Extend modify_qp and support packet pacing")
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c