]> xenbits.xensource.com Git - people/liuw/xen.git/commit
cpupool: correct error handling when removing cpu from cpupool
authorJuergen Gross <jgross@suse.com>
Wed, 9 Mar 2016 15:44:04 +0000 (16:44 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 15 Mar 2016 16:32:34 +0000 (16:32 +0000)
commitac2f5f3d42d66d10af3ba56f40a44ffa23f79aaf
tree330e143ca22d9822bb0fb905d491475b8957eb7c
parent9176383599fbb99212f078fc8982a5dafc835f5d
cpupool: correct error handling when removing cpu from cpupool

When schedule_cpu_switch() called from cpupool_unassign_cpu_helper()
returns an error, the domlist_read_lock isn't released again.

As cpu_disable_scheduler() might have changed affinity of some
domains domain_update_node_affinity() must be called for all domains
in the cpupool even in error case.

Even if looking weird it is okay to let the to be removed cpu set in
cpupool_free_cpus in case of an error returned by
cpu_disable_scheduler(). Add a comment explaining the reason for this.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/cpupool.c