Skip to content
Commit 2874211f authored by Dan Carpenter's avatar Dan Carpenter Committed by Michael S. Tsirkin
Browse files

vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()

There is a pointer math bug here so if "offset" is non-zero then this
will copy memory from beyond the end of the array.

Fixes: 1a86b377

 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200808093241.GB115053@mwanda
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarEli Cohen <elic@nvidia.com>
Cc: Jason Wang <jasowang@redhat.com>; Parav Pandit <parav@mellanox.com>; virtualization@lists.linux-foundation.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
Fixes: 1a86b377

 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
parent f31231bf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment