Skip to contentSkip to conversation

New: nSVM: missing unmap in nested_svm_vmrun()

Bug 220963 [email protected] 2 participants 3 messages Jan 10 – Jan 13 KVM

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=220963

Bug ID: 220963
Summary: nSVM: missing unmap in nested_svm_vmrun()
Product: Virtualization
Version: unspecified
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: kvm
Assignee: [email protected]
Reporter: [email protected]
Regression: No

In nested_svm_vmrun():

    ret = kvm_vcpu_map(vcpu, gpa_to_gfn(vmcb12_gpa), &map);
...
    if (WARN_ON_ONCE(!svm->nested.initialized))
        return -EINVAL;

A call to kvm_vcpu_unmap() is missing before the return.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw
Quoted 16 lines · On Sat, Jan 10, 2026 at 07:33:25PM +0000, [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=220963

Bug ID: 220963
Summary: nSVM: missing unmap in nested_svm_vmrun()
Product: Virtualization
Version: unspecified
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: kvm
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Quoted 8 lines

In nested_svm_vmrun():

    ret = kvm_vcpu_map(vcpu, gpa_to_gfn(vmcb12_gpa), &map);
...
    if (WARN_ON_ONCE(!svm->nested.initialized))
        return -EINVAL;

A call to kvm_vcpu_unmap() is missing before the return.

I think I accidentally fixed this in
https://lore.kernel.org/kvm/[email protected]/.

It's probably not a big deal, as reaching nested_svm_vmrun() without svm->nested.initialized means we already have another bug :)

Quoted 6 lines
Signature · 5 lines
-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 220963] nSVM: missing unmap in nested_svm_vmrun()

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220963

--- Comment #1 from [email protected] ---

Quoted 16 lines · On Sat, Jan 10, 2026 at 07:33:25PM +0000, [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=220963

Bug ID: 220963
Summary: nSVM: missing unmap in nested_svm_vmrun()
Product: Virtualization
Version: unspecified
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: kvm
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Quoted 8 lines

In nested_svm_vmrun():

    ret = kvm_vcpu_map(vcpu, gpa_to_gfn(vmcb12_gpa), &map);
...
    if (WARN_ON_ONCE(!svm->nested.initialized))
        return -EINVAL;

A call to kvm_vcpu_unmap() is missing before the return.

I think I accidentally fixed this in
https://lore.kernel.org/kvm/[email protected]/.

It's probably not a big deal, as reaching nested_svm_vmrun() without svm->nested.initialized means we already have another bug :)

Quoted 6 lines
Signature · 5 lines
-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.