Skip to content

Commit 1b6830e

Browse files
committed
Merge: mlxsw: spectrum_acl_tcam: Fix incorrect list API usage [rhel-9]
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4335 JIRA: https://issues.redhat.com/browse/RHEL-37486 CVE: CVE-2024-36006 Commits: ``` b377add ("mlxsw: spectrum_acl_tcam: Fix incorrect list API usage") ``` Signed-off-by: Ivan Vecera <ivecera@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Petr Oros <poros@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 6aab43e + a5f73cf commit 1b6830e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,9 @@ mlxsw_sp_acl_tcam_vchunk_migrate_one(struct mlxsw_sp *mlxsw_sp,
12331233
return 0;
12341234
}
12351235

1236+
if (list_empty(&vchunk->ventry_list))
1237+
goto out;
1238+
12361239
/* If the migration got interrupted, we have the ventry to start from
12371240
* stored in context.
12381241
*/
@@ -1282,6 +1285,7 @@ mlxsw_sp_acl_tcam_vchunk_migrate_one(struct mlxsw_sp *mlxsw_sp,
12821285
}
12831286
}
12841287

1288+
out:
12851289
mlxsw_sp_acl_tcam_vchunk_migrate_end(mlxsw_sp, vchunk, ctx);
12861290
return 0;
12871291
}
@@ -1295,6 +1299,9 @@ mlxsw_sp_acl_tcam_vchunk_migrate_all(struct mlxsw_sp *mlxsw_sp,
12951299
struct mlxsw_sp_acl_tcam_vchunk *vchunk;
12961300
int err;
12971301

1302+
if (list_empty(&vregion->vchunk_list))
1303+
return 0;
1304+
12981305
/* If the migration got interrupted, we have the vchunk
12991306
* we are working on stored in context.
13001307
*/

0 commit comments

Comments
 (0)