mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 03:17:30 +07:00
IB/core: Fix oops in ib_cache_gid_set_default_gid
When we fail to find the default gid index, we can't continue
processing in this routine or else we will pass a negative
index to later routines resulting in invalid memory access
attempts and a kernel oops.
Fixes: 03db3a2d81
(IB/core: Add RoCE GID table management)
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
5f44abd041
commit
d29c9ab1a2
@ -691,7 +691,8 @@ void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
|
||||
NULL);
|
||||
|
||||
/* Coudn't find default GID location */
|
||||
WARN_ON(ix < 0);
|
||||
if (WARN_ON(ix < 0))
|
||||
goto release;
|
||||
|
||||
zattr_type.gid_type = gid_type;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user