Skip to content
Commit 8795692f authored by Eli Cohen's avatar Eli Cohen Committed by Greg Kroah-Hartman
Browse files

vdpa/mlx5: Fix possible failure in umem size calculation

[ Upstream commit 71ab6a7c ]

umem size is a 32 bit unsigned value so assigning it to an int could
cause false failures. Set the calculated value inside the function and
modify function name to reflect the fact it updates the size.

This bug was found during code review but never had real impact to this
date.

Fixes: 1a86b377

 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210530090349.8360-1-elic@nvidia.com


Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 63272b1f
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