From: Maor Gottlieb Date: Thu, 17 Aug 2017 12:50:35 +0000 (+0300) Subject: RDMA/mlx4: Fix create qp command alignment X-Git-Tag: v4.14-rc2~9^2~90^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55f2467cd717241dd941153d4db1e23c91aecf98;p=platform%2Fkernel%2Flinux-exynos.git RDMA/mlx4: Fix create qp command alignment Avoid extra padding by replacing the order of inl_recv_sz and reserved, otherwise 'mlx4_ib_create_qp' structure might be larger than legacy user input leading to copy of some garbage data from the user space buffer. Fixes: ea30b966f7dd ('IB/mlx4: Add inline-receive support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford --- diff --git a/include/uapi/rdma/mlx4-abi.h b/include/uapi/rdma/mlx4-abi.h index d915cab..21cce1a 100644 --- a/include/uapi/rdma/mlx4-abi.h +++ b/include/uapi/rdma/mlx4-abi.h @@ -111,8 +111,8 @@ struct mlx4_ib_create_qp { __u8 log_sq_bb_count; __u8 log_sq_stride; __u8 sq_no_prefetch; - __u32 inl_recv_sz; __u8 reserved; + __u32 inl_recv_sz; }; struct mlx4_ib_create_wq {