Skip to content

Commit

Permalink
Merge pull request google#1540 from laijs:fix-PCIDs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 289925133
  • Loading branch information
gvisor-bot committed Jan 15, 2020
2 parents 275ac8c + fdfa05f commit 2ebd214
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/sentry/platform/kvm/machine_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ func (m *machine) dropPageTables(pt *pagetables.PageTables) {

// Clear from all PCIDs.
for _, c := range m.vCPUs {
c.PCIDs.Drop(pt)
if c.PCIDs != nil {
c.PCIDs.Drop(pt)
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/sentry/platform/kvm/machine_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (m *machine) dropPageTables(pt *pagetables.PageTables) {

// Clear from all PCIDs.
for _, c := range m.vCPUs {
c.PCIDs.Drop(pt)
if c.PCIDs != nil {
c.PCIDs.Drop(pt)
}
}
}

Expand Down

0 comments on commit 2ebd214

Please sign in to comment.