Commit c1af8227 authored by Junxian Huang's avatar Junxian Huang Committed by Juan Zhou
Browse files

RDMA/hns: Add check and adjust for function resource values

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8H7RB



--------------------------------------------------------------------------

Currently, RoCE driver gets function resource values from firmware without
validity check. As these resources are mostly related to memory, an
invalid value may lead to serious consequence such as kernel panic.

This patch adds check for these resource values and adjusts the invalid
ones.

Fixes: 74e1531c ("RDMA/hns: Reserve the resource for the VFs")
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
parent 48a79994
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment