Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Maor Gottlieb and committed by
Doug Ledford
55f2467c fba02e6c

+1 -1
+1 -1
include/uapi/rdma/mlx4-abi.h
··· 111 111 __u8 log_sq_bb_count; 112 112 __u8 log_sq_stride; 113 113 __u8 sq_no_prefetch; 114 - __u32 inl_recv_sz; 115 114 __u8 reserved; 115 + __u32 inl_recv_sz; 116 116 }; 117 117 118 118 struct mlx4_ib_create_wq {