From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [hypervisor deadlock] Re: [PATCH v9 for Xen 4.7 1/4] xen: enable per-VCPU parameter for RTDS Date: Mon, 4 Apr 2016 18:32:48 +0200 Message-ID: <1459787568.3166.4.camel@citrix.com> References: <1459486786-3085-1-git-send-email-lichong659@gmail.com> <1459486786-3085-2-git-send-email-lichong659@gmail.com> <570284F0.5090201@citrix.com> <570290CD.8070603@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2829080689508703720==" Return-path: In-Reply-To: <570290CD.8070603@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , Chong Li , Andrew Cooper Cc: Chong Li , Wei Liu , Sisu Xi , George Dunlap , xen-devel , Meng Xu , Jan Beulich , Dagaen Golomb List-Id: xen-devel@lists.xenproject.org --===============2829080689508703720== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ponqjkg7XLaapUXIlWhj" --=-ponqjkg7XLaapUXIlWhj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-04-04 at 17:05 +0100, George Dunlap wrote: > On 04/04/16 16:58, Chong Li wrote: > > On Mon, Apr 4, 2016 at 10:14 AM, Andrew Cooper > > wrote: > > > On 01/04/16 05:59, Chong Li wrote: > > > >=C2=A0 > > > > --- a/xen/common/sched_credit2.c > > > > +++ b/xen/common/sched_credit2.c > > > > @@ -1421,14 +1421,12 @@ csched2_dom_cntl( > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* runq lock to update csvcs. */ > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0spin_lock_irqsave(&prv->lock, flags); > > > >=20 > > > > -=C2=A0=C2=A0=C2=A0=C2=A0if ( op->cmd =3D=3D XEN_DOMCTL_SCHEDOP_get= info ) > > > > +=C2=A0=C2=A0=C2=A0=C2=A0switch ( op->cmd ) > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ > > > > +=C2=A0=C2=A0=C2=A0=C2=A0case XEN_DOMCTL_SCHEDOP_getinfo: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0op->u.credit2= .weight =3D sdom->weight; > > > > -=C2=A0=C2=A0=C2=A0=C2=A0} > > > > -=C2=A0=C2=A0=C2=A0=C2=A0else > > > > -=C2=A0=C2=A0=C2=A0=C2=A0{ > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(op->cmd =3D= =3D XEN_DOMCTL_SCHEDOP_putinfo); > > > > - > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0break; > > > > +=C2=A0=C2=A0=C2=A0=C2=A0case XEN_DOMCTL_SCHEDOP_putinfo: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if ( op->u.cr= edit2.weight !=3D 0 ) > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0struct vcpu *v; > > > > @@ -1457,6 +1455,9 @@ csched2_dom_cntl( > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0vcpu_schedule_unlock(lock, svc->vcpu); > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0} > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0break; > > > > +=C2=A0=C2=A0=C2=A0=C2=A0default: > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return -EINVAL; > > > As does this. > > >=20 > > > Please submit a bugfix ASAP.=C2=A0=C2=A0This will become a security > > > vulnerability > > > if Xen 4.7 is shipped without it being fixed. > > >=20 > > > >=20 > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > > > >=20 > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0spin_unlock_irqrestore(&prv->lock, fl= ags); > > Thanks for pointing this out. > >=20 > > Dario, do you want to include this bugfix in your cleanup patch, or > > let me submit this? > If you're around and can test it, it's probably better if you can > send a > patch right a way. >=20 Exactly. In fact: =C2=A0- we don't fold bugfixes in clanups, =C2=A0- I think I mentioned wanting to cleanup some code duplication in=C2= =A0 =C2=A0 =C2=A0libxl, this is in xen, =C2=A0- cleanups are delayed to 4.8, while this must be fixed before=C2=A0 =C2=A0 =C2=A0release (or the patch/the whole feature be reverted). So, if you can't work out a fix today or, at most, tomorrow, let me know and I'll do it myself. Sorry for not catching this during review... :-/ Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-ponqjkg7XLaapUXIlWhj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlcClzAACgkQk4XaBE3IOsSraACfbdH3vX9GQVUFr6GF4Jg2eJN0 LV0AoJTyPIAhpfDfKsG0BIKbYmW7d7sW =u3Pv -----END PGP SIGNATURE----- --=-ponqjkg7XLaapUXIlWhj-- --===============2829080689508703720== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============2829080689508703720==--