Skip to content

Commit

Permalink
ppc/vof: Fix missed fields in VOF cleanup
Browse files Browse the repository at this point in the history
Failing to reset the of_instance_last makes ihandle allocation continue
to increase, which causes record-replay replay fail to match the
recorded trace.

Not resetting claimed_base makes VOF eventually run out of memory after
some resets.

Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Fixes: fc8c745 ("spapr: Implement Open Firmware client interface")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 7b8589d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
npiggin authored and Michael Tokarev committed Sep 11, 2023
1 parent 13f9872 commit 86b40ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/ppc/vof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,8 @@ void vof_cleanup(Vof *vof)
}
vof->claimed = NULL;
vof->of_instances = NULL;
vof->of_instance_last = 0;
vof->claimed_base = 0;
}

void vof_build_dt(void *fdt, Vof *vof)
Expand Down

0 comments on commit 86b40ee

Please sign in to comment.