Skip to content

[release-0.4] Fix nil pointer panic in verifyDisabledVFs for non-SR-IOV GPUs#1194

Merged
shivamerla merged 1 commit into
kubernetes-sigs:release-0.4from
k8s-infra-cherrypick-robot:cherry-pick-1186-to-release-0.4
Jun 11, 2026
Merged

[release-0.4] Fix nil pointer panic in verifyDisabledVFs for non-SR-IOV GPUs#1194
shivamerla merged 1 commit into
kubernetes-sigs:release-0.4from
k8s-infra-cherrypick-robot:cherry-pick-1186-to-release-0.4

Conversation

@k8s-infra-cherrypick-robot

@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot commented Jun 11, 2026

Copy link
Copy Markdown

This is an automated cherry-pick of #1186

/assign shivamerla

Fix nil pointer panic during allocation for sandbox workloads with non-SR-IOV GPUs

GPUs that do not support SR-IOV (e.g. NVIDIA T400) have
SriovInfo.PhysicalFunction set to nil. The existing code dereferences
PhysicalFunction.NumVFs without a nil check, causing a panic when VFIO
passthrough is configured for such GPUs.

Add nil checks for both the gpu return value and PhysicalFunction. A nil
PhysicalFunction means no VFs can exist, so it is safe to proceed.

Signed-off-by: Miaoxiang <miaoxiang.philips@gmail.com>
@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jun 11, 2026
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 11, 2026
@shivamerla

shivamerla commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/kind bug
/release-note

Fix nil pointer panic during allocation for sandbox workloads with non-SR-IOV GPUs

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jun 11, 2026
@shivamerla shivamerla added this to the v0.4.1 milestone Jun 11, 2026
@shivamerla shivamerla moved this from Backlog to In-Review in DRA Driver for NVIDIA GPUs Jun 11, 2026
@shivamerla

Copy link
Copy Markdown
Contributor

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 11, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: fbd7086f6924f6a740b30a5e90a75aa8af0c4cf3

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k8s-infra-cherrypick-robot, shivamerla

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 11, 2026
@shivamerla shivamerla merged commit 456359d into kubernetes-sigs:release-0.4 Jun 11, 2026
11 of 13 checks passed
@github-project-automation github-project-automation Bot moved this from In-Review to Done in DRA Driver for NVIDIA GPUs Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants