Skip to content
Commit 87cade29 authored by Eran Ben Elisha's avatar Eran Ben Elisha Committed by David S. Miller
Browse files

net/mlx5: Fix return code in case of hyperv wrong size read

Return code value could be non deterministic in case of wrong size read.
With this patch, if such error occurs, set rc to be -EIO.

In addition, mlx5_hv_config_common() supports reading of
HV_CONFIG_BLOCK_SIZE_MAX bytes only, fix to early return error with
bad input.

Fixes: 913d14e8

 ("net/mlx5: Add wrappers for HyperV PCIe operations")
Reported-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7a42eb4
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