diff options
author | Mark Bloch <markb@mellanox.com> | 2020-08-24 14:02:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-17 13:47:54 +0200 |
commit | a0f6bdafaa4c5bb057c8aea5ac2ddfc52a5355f5 (patch) | |
tree | cd98ec5d3ae2b3d8196aa80a38dc44dafc45561c /drivers/video/fbdev/macmodes.c | |
parent | 616a0c13e43219a9803c993e256637d3e8117296 (diff) |
RDMA/mlx4: Read pkey table length instead of hardcoded value
commit ec78b3bd66bc9a015505df0ef0eb153d9e64b03b upstream.
If the pkey_table is not available (which is the case when RoCE is not
supported), the cited commit caused a regression where mlx4_devices
without RoCE are not created.
Fix this by returning a pkey table length of zero in procedure
eth_link_query_port() if the pkey-table length reported by the device is
zero.
Link: https://lore.kernel.org/r/20200824110229.1094376-1-leon@kernel.org
Cc: <stable@vger.kernel.org>
Fixes: 1901b91f9982 ("IB/core: Fix potential NULL pointer dereference in pkey cache")
Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/macmodes.c')
0 files changed, 0 insertions, 0 deletions