Skip to content

Reject a MIG capability name that is only a prefix - #2117

Open
SashaMIT wants to merge 1 commit into
NVIDIA:mainfrom
SashaMIT:fix/mig-cap-whole-name
Open

SashaMIT wants to merge 1 commit into
NVIDIA:mainfrom
SashaMIT:fix/mig-cap-whole-name

Conversation

@SashaMIT

Copy link
Copy Markdown

A minors line gpu0/gi0/accessEXTRA 3 was accepted as capability gpu0/gi0/accessEXTRA with minor 3. gpu0/gi0/ci0/accessEXTRA 4 was accepted the same way. fmt.Sscanf reports a match as soon as the indexes are read, so the rest of the token never had to be empty.

The check now rebuilds gpuN/giN/access or gpuN/giN/ciN/access and requires that text to be the whole token. gpu0/gi0/access 3, gpu0/gi0/ci0/access 4, config, and monitor stay valid.

Drafted with Grok 4.7. The code has not yet been reviewed by a human.

Sscanf counted a match before the rest of the token was checked, so gpu0/gi0/accessEXTRA was stored as a capability.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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