mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix a bug in PCIDs.Assign
Store the new assigned pcid in p.cache[pt]. Signed-off-by: ShiruRen <renshiru2000@gmail.com> Change-Id: I4aee4e06559e429fb5e90cb9fe28b36139e3b4b6 PiperOrigin-RevId: 207563833
This commit is contained in:
@@ -64,6 +64,7 @@ func (p *PCIDs) Assign(pt *PageTables) (uint16, bool) {
|
||||
if len(p.avail) > 0 {
|
||||
pcid := p.avail[len(p.avail)-1]
|
||||
p.avail = p.avail[:len(p.avail)-1]
|
||||
p.cache[pt] = pcid
|
||||
|
||||
// We need to flush because while this is in the available
|
||||
// pool, it may have been used previously.
|
||||
|
||||
Reference in New Issue
Block a user