Commit fa13843
committed
KVM: X86: fix lazy allocation of rmaps
If allocation of rmaps fails, but some of the pointers have already been written,
those pointers can be cleaned up when the memslot is freed, or even reused later
for another attempt at allocating the rmaps. Therefore there is no need to
WARN, as done for example in memslot_rmap_alloc, but the allocation *must* be
skipped lest KVM will overwrite the previous pointer and will indeed leak memory.
Signed-off-by: Paolo Bonzini <[email protected]>1 parent e2b6d94 commit fa13843
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11392 | 11392 | | |
11393 | 11393 | | |
11394 | 11394 | | |
11395 | | - | |
| 11395 | + | |
| 11396 | + | |
11396 | 11397 | | |
11397 | 11398 | | |
11398 | 11399 | | |
| |||
0 commit comments