Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parseNvidiaNumaInfo index out of range #889

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flpanbin
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR fixes a potential array index out of bounds issue in the parseNvidiaNumaInfo function. The issue occurs when accessing NUMA Affinity data for the target GPU where the row has fewer columns than expected.

Current code assumes the NUMA Affinity column exists in every row, but when processing the target GPU's data, if this column is missing, it will cause an index out of bounds panic.

The fix adds proper bounds checking before accessing the NUMA Affinity value, making the NVIDIA device plugin more robust when handling various topology output formats.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant