Juergen Gross
2013-Feb-27 09:43 UTC
[PATCH] (V2) Avoid stale pointer when moving domain to another cpupool
When a domain is moved to another cpupool the scheduler private data pointers in vcpu and domain structures must never point to an already freed memory area. While at it, simplify sched_init_vcpu() by using DOM2OP instead VCPU2OP. Changes since V1: - don''t use an an own loop for freeing vcpu_data - free old domain data after unpausing the domain - simplify sched_init_vcpu (DOM2OP instead VCPU2OP) Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> 1 file changed, 14 insertions(+), 6 deletions(-) xen/common/schedule.c | 20 ++++++++++++++------ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jan Beulich
2013-Feb-27 10:08 UTC
Re: [PATCH] (V2) Avoid stale pointer when moving domain to another cpupool
>>> On 27.02.13 at 10:43, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote: > When a domain is moved to another cpupool the scheduler private data pointers > in vcpu and domain structures must never point to an already freed memory > area. > > While at it, simplify sched_init_vcpu() by using DOM2OP instead VCPU2OP. > > Changes since V1: > - don''t use an an own loop for freeing vcpu_data > - free old domain data after unpausing the domain > - simplify sched_init_vcpu (DOM2OP instead VCPU2OP) > > Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>Looks good to me now, but will want to be ack-ed by George. Jan
George Dunlap
2013-Feb-28 11:11 UTC
Re: [PATCH] (V2) Avoid stale pointer when moving domain to another cpupool
On Wed, Feb 27, 2013 at 10:08 AM, Jan Beulich <JBeulich@suse.com> wrote:> >>> On 27.02.13 at 10:43, Juergen Gross <juergen.gross@ts.fujitsu.com> > wrote: > > When a domain is moved to another cpupool the scheduler private data > pointers > > in vcpu and domain structures must never point to an already freed memory > > area. > > > > While at it, simplify sched_init_vcpu() by using DOM2OP instead VCPU2OP. > > > > Changes since V1: > > - don''t use an an own loop for freeing vcpu_data > > - free old domain data after unpausing the domain > > - simplify sched_init_vcpu (DOM2OP instead VCPU2OP) > > > > Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> > > Looks good to me now, but will want to be ack-ed by George. >Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Thanks Juergen. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel