On 15.02.2013, at 15:35, Andreas Färber wrote: > Am 15.02.2013 15:29, schrieb Alexander Graf: >> >> On 15.02.2013, at 15:25, Andreas Färber wrote: >> >>> Since we still need env for ppc-specific fields, obtain it via the new >>> env_ptr fields to avoid "cpu" name conflicts between CPUState and >>> PowerPCCPU for now. >>> >>> This fixes a potential issue with env being NULL at the end of the loop >>> but cpu still being a valid pointer corresponding to a previous env. >>> >>> Signed-off-by: Andreas Färber <afaer...@suse.de> >>> --- >>> Alex, this is a rebased and slimmed-down version of yesterday's paste. >>> Can you ack please? Thanks, /-F >> >> In your QOM conversion you also converted other places like this. Have you >> verified that these don't suffer from the same problem? > > Not yet. Not all callers are using this pattern though, so solutions > would differ and be per-case patches.
This specific patch is: Acked-by: Alexander Graf <ag...@suse.de> However, please make sure to fix the other places too :) Alex > > At some point I obviously intend to change first_cpu and ->next_cpu to > CPUState and have been wondering whether we can use QTAILQ macros or > anything else more "standardized", with better iteration support. > > Andreas > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg