[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] cpupool: prevent a domain from moving itself
commit bb812101db5117e07de1b557b355c3855850cc95 Author: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> AuthorDate: Tue Apr 23 11:48:11 2013 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Apr 23 11:48:11 2013 +0200 cpupool: prevent a domain from moving itself In the XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN operation, the existing check for domid == 0 should be checking that a domain does not attempt to modify its own cpupool; fix this by using rcu_lock_remote_domain_by_id. Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> Acked-by: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> --- xen/common/cpupool.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index 2aaa486..2164a9f 100644 --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -576,12 +576,8 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) { struct domain *d; - ret = -EINVAL; - if ( op->domid == 0 ) - break; - ret = -ESRCH; - d = rcu_lock_domain_by_id(op->domid); - if ( d == NULL ) + ret = rcu_lock_remote_domain_by_id(op->domid, &d); + if ( ret ) break; if ( d->cpupool == NULL ) { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |